New syntax for comma expression
Paul Backus
snarwin at gmail.com
Thu Nov 21 01:59:40 UTC 2024
On Wednesday, 20 November 2024 at 23:11:37 UTC, Richard (Rikki)
Andrew Cattermole wrote:
> During semantic analysis, some code gets lowered to the comma
> expression.
>
> [...]
>
> Proposed grammar:
>
> ```diff
> CommaExpression:
> + "class" ConstructorArgs|opt AnonBaseClassList|opt
> AggregateBody
> + "__commaExpr" '(' CommaExpression ')'
> ```
As a general rule, I don't think we should be adding new syntax
to D because it's easier for the compiler to generate than the
existing syntax.
If there's something in D's semantics that the existing syntax
*can't express*, then there's a discussion to be had. But I don't
think this qualifies.
More information about the dip.ideas
mailing list