3 ms·
I would just be happy with a change that allowed me to not keep repeating the type identifier all the time. Something like: int foo(int x, y, z, float a, b,
by rootbear 7y ago
I would just be happy with a change that allowed me to not keep repeating the type identifier all the time. Something like:
int foo(int x, y, z, float a, b, c) { ...
instead of
int foo(int x, int y, int z, float a, float b, float c) { ...
Yes, you can pack things like that into a struct sometimes, but not always. From talking to folks who were on the ANSI committee at the time, there was some reason why the first example wouldn't work. Some parsing ambiguity, but I forget the details.
It's distressing to see new languages (like D) adopt this verbose style as if it were some well thought out idea. It wasn't, it was just a consequence of the new declaration style that the ANSI C committee adopted.