lemmydividebyzero@reddthat.com to Technology@lemmy.worldEnglish · 2 days agoName before type: why 'age int' is better than 'int age'benhoyt.comexternal-linkmessage-square62fedilinkarrow-up159
arrow-up159external-linkName before type: why 'age int' is better than 'int age'benhoyt.comlemmydividebyzero@reddthat.com to Technology@lemmy.worldEnglish · 2 days agomessage-square62fedilink
minus-squarejdr@lemmy.mlcakelinkfedilinkEnglisharrow-up8·2 days agoThat’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”.
minus-squareanotherandrew@lemmy.mixdown.calinkfedilinkEnglisharrow-up12·2 days ago100% and why I think int* should be at the least a compiler warning, perhaps an outright error with pedantic enabled.
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.