Re:Language Design: Use 'ident: Type' not 'Type ident'
by cyphar on Friday May 01, 2020 @10:27PM
(#23048591)
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:
And that's usually why most C style guidelines use
Now, if we treated "int<asterisk>" as the full type name in the syntax then you get a much nicer result:
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:
[ Parent
| on HN ]
There are no comments on this comment yet.