3 ms·
People have been arguing about where the asterisk should be for a very long time. The main counter-argument to the construction you used is that multiple variab
by cyphar 6y ago
People have been arguing about where the asterisk should be for a very long time. The main counter-argument to the construction you used is that multiple variable declaration immediately looks ugly given the current rules of C variable declaration:
int* a,* b; // ??
And that's usually why most C style guidelines use
int *a, *b;
Now, if we treated "int<asterisk>" as the full type name in the syntax then you get a much nicer result:
int* a, b; // much nicer!
Though that does have its own tradeoffs. But that would require actually changing the C syntax, at which point you might as well make it the postfix syntax:
var a, b int*;