New syntax for comma expression

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Thu Nov 21 02:40:15 UTC 2024


On 21/11/2024 3:26 PM, Paul Backus wrote:
> On Thursday, 21 November 2024 at 02:09:14 UTC, Richard (Rikki) Andrew 
> Cattermole wrote:
>>
>> On 21/11/2024 2:59 PM, Paul Backus wrote:
>>> 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.
>>
>> This is not an ease of use situation.
>>
>> There is nothing for the lowering to map to in the syntax.
> 
> Why does the lowering have to map to anything? It's an implementation 
> detail of the compiler.

It's not an implementation detail of the compiler.

The comma expression is in the language. But because of tuples its on 
the way out and so it doesn't support everything that it needs to.

Regardless the .di generator is broken for D code. That means errors are 
not emitting correct code either. This affects a lot more than just a 
couple of switches.

A simple parser change that won't break code and which has the chance to 
fix some hard problems should be an easy win.

If you think this can be fixed another way, please prove me wrong. I'd 
love for the .di generator to be functional regardless of who or what 
approach is taken to achieve it.



More information about the dip.ideas mailing list