Variable declaration primary expression

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Tue Jan 21 01:18:08 UTC 2025


On 21/01/2025 12:23 PM, IchorDev wrote:
> On Monday, 20 January 2025 at 21:08:09 UTC, Richard (Rikki) Andrew 
> Cattermole wrote:
>> On 21/01/2025 9:41 AM, IchorDev wrote:
>>> Someone brought up this clever idea here: https://github.com/dlang/ 
>>> dmd/ pull/20653#issuecomment-2581474608
>>> What does everyone think about being able to declare variables in 
>>> expressions? Is there any pre-existing syntax that blocks us from 
>>> being able to easily do this?
>>
>> I don't know about syntax, but rewrites do use VarDeclaration in an 
>> expression (including CommaExpression).
>>
>> I'd call this long overdue if it works in syntax.
> 
> What do you mean by ‘works in syntax’?

I just mean that if there are no problems in the grammar then it would 
be a good addition.



More information about the dip.ideas mailing list