Postfix type notation - readability and parsing?

Dennis dkorpel at gmail.com
Fri Mar 8 10:58:24 UTC 2019


On Thursday, 7 March 2019 at 20:18:28 UTC, aliak wrote:
> Hmm, thanks for pointing that out! I guess that's indeed 
> ambiguous without parens or something.

I'm not in favor of adding a second type syntax, but note that 
the current scheme is also ambiguous:

const int[]

Is that const(int[]) or const(int)[]? It's the former, if you 
want the latter use explicit parentheses. Operators in general 
are full of ambiguities that are solved by precedence and 
associativity rules and parens to override them.


More information about the Digitalmars-d mailing list