Advertisement

What don't you like about your programming language?

Started by February 19, 2014 10:38 AM
48 comments, last by ChaosEngine 10 years, 8 months ago
Just the opposite to my previous thread. What are the things you wish they would remove or should be better implemented? What features do you wish they should add that will make it easier to use?

UNREAL ENGINE 4:
Total LOC: ~3M Lines
Total Languages: ~32

--
GREAT QUOTES:
I can do ALL things through Christ - Jesus Christ
--
Logic will get you from A-Z, imagination gets you everywhere - Albert Einstein
--
The problems of the world cannot be solved by skeptics or cynics whose horizons are limited by the obvious realities. - John F. Kennedy

In C#...

I wish there was a (better) way to create local references. The problem is that when I'm working with arrays of structs, I have to type the entire expression for every statement which yields a lot of duplication.

myArray[indexLookup[i] - 1].SomeStructField.SomeMember = someValue;
myArray[indexLookup[i] - 1].SomeStructField.SomeOtherMember = false;
// ...
Here I wish I had been able to make a local reference to that element and/or that SomeStructField. At the moment you have to wrap it with something like

WorkWith(ref myArray[indexLookup[i] - 1].SomeStructField, 
a => {
  a.SomeMember = someValue; 
  a.SomeOtherMember=false;
});
Edit:
Oh, and some form of specialized "generics". I miss the ability to create a generic that is only valid for a specific set of classes/structs, such as int, long and double.
Advertisement

C#:

I have an irrational hatred of the "var" keyword. This is more of a style thing as it has its uses, but I've worked with people that use it everywhere.

C#:

I have an irrational hatred of the "var" keyword. This is more of a style thing as it has its uses, but I've worked with people that use it everywhere.

++

Do you folks like coffee?
That's a hard question. Every language I've worked with has things it could do better. Sometimes I wish a language would handle a construct better, but other times I select a language precisely because it has that construct.

As one example, some languages let you play fast and loose with data, it can be a string here, values there, and an array somewhere else. When I need to play fast and loose, such as writing scripts to run programs in a tool chain, these can be very nice. Other languages they are careful and meticulous about data types. When I need precision these rules can be very nice.

Occasionally when working in one language I'll wish I had something from another language. Usually it is just a mild desire, but if it bothers me too much I'll just write the code in the other language, find a compiler for the language, and add it in.

That's a hard question. Every language I've worked with has things it could do better. Sometimes I wish a language would handle a construct better, but other times I select a language precisely because it has that construct.
As one example, some languages let you play fast and loose with data, it can be a string here, values there, and an array somewhere else. When I need to play fast and loose, such as writing scripts to run programs in a tool chain, these can be very nice. Other languages they are careful and meticulous about data types. When I need precision these rules can be very nice.
Occasionally when working in one language I'll wish I had something from another language. Usually it is just a mild desire, but if it bothers me too much I'll just write the code in the other language, find a compiler for the language, and add it in.

it would be nice to have one language that has everything right. Ease of use, general purpose precision etc. But i'm guessing nothing can be 100%.
Some things in c++ make me wonder why i would want to use them or why they are there.

UNREAL ENGINE 4:
Total LOC: ~3M Lines
Total Languages: ~32

--
GREAT QUOTES:
I can do ALL things through Christ - Jesus Christ
--
Logic will get you from A-Z, imagination gets you everywhere - Albert Einstein
--
The problems of the world cannot be solved by skeptics or cynics whose horizons are limited by the obvious realities. - John F. Kennedy

Advertisement

Just the opposite to my previous thread. What are the things you wish they would remove or should be better implemented? What features do you wish they should add that will make it easier to use?

The declaration syntax in C++ could learn a thing or two from Go's. In particular, function pointer declarations in C++ are really ugly.

it would be nice to have one language that has everything right. Ease of use, general purpose precision etc. But i'm guessing nothing can be 100%.
Some things in c++ make me wonder why i would want to use them or why they are there.

Did you read the book I recommended to you in the other thread? Did you work through all the exercises?

Read, study and gain experience. You WON'T become proficient in C++ in just a few days or weeks or months. Some features will probaly only dawn on you YEARS after you first read about them, yet there are probably many use cases for each of them.

C99 is almost perfect as an old-school procedural language, but it would be so much better if it also had function overloading. Yes, I understand the potential difficulties this would cause, so it's firmly in the realm of wishful thinking, and yes, I also understand the "so why don't you just use C++ instead?" argument. Can I just say that I'd love C99 so much more if it had function overloading?

Direct3D has need of instancing, but we do not. We have plenty of glVertexAttrib calls.

In C, I hate signal handling... gosh, couldn't we just have a non global way to send info to the signal handler? u.u

Currently working on a scene editor for ORX (http://orx-project.org), using kivy (http://kivy.org).

C#:

I have an irrational hatred of the "var" keyword. This is more of a style thing as it has its uses, but I've worked with people that use it everywhere.

YES YES AND YES!

I hate that keyword, especially in JavaScript (and how it requires it!). I'm glad I'm not the only one!

I wish classes were easier to make in Objective-C. Right now, this is what it looks like...

You have to create a header file(which includes the names of any instance methods you need to use), and then a source file (the thing that actually makes the instance methods work!), like this:

Header:


@interface MyClass: NSObject
-(void) myMethod;
@end

Source:


@implementation MyClass
-(void) myMethod
{
    NSLog(@"Bit of a roundabout way to do this, eh?");
}
@end

Then you call it like this in your main source file, in the main function...


MyClass *newClass = [[MyClass alloc] init];
[newClass myMethod];

Why couldn't the engineers of Objective-C done it like regular programming languages? :P

I'm used to it now, but it did take me a little bit to get used to it...

My website! yodamanjer.com
My development blog!

Follow me on Twitter! [twitter]jwg1991[/twitter]

This topic is closed to new replies.

Advertisement