37
Name before type: why 'age int' is better than 'int age'
(benhoyt.com)
This is a most excellent place for technology news and articles.
I don't think this is a related at all. C could have easily decided that the definition makes both
xandypointers. They just decided not to so that you can declare more variables on one line by being able to doint x, *y, **z, .... It is more flexible.Similarly that Go line could have been parsed like
var x, (y*) intif they wanted to. They just made a different choice.That's because declaring several variables on the same line is syntactic sugar, although I agree it makes little sense this way
That's why you write
int *x, y, **z;
C doesn't write like "x is an int-pointer", rather it says "dereferencing x will get you an int".
100% and why I think
int*should be at the least a compiler warning, perhaps an outright error with pedantic enabled.