RFC: 2 enhancement DIPs that need feedback

Basile B. b2.temp at gmx.com
Fri May 16 11:24:15 UTC 2025


On Wednesday, 14 May 2025 at 16:56:23 UTC, Timon Gehr wrote:
> On 5/13/25 11:04, Basile B. wrote:
>> [...]
>
> No, this syntax would not work just because there would be 
> variable declaration as expression. You still need a) tuple 
> literals b) dedicated unpacking logic.
>
>
>> [...]
>
> Actually that is not true. The DIP does not propose dedicated 
> tuple syntax to be added. It's just about unpacking. Anyway, 
> it's not like that blocks work on your vision at all.
>
>> [...]
>
> Go ahead and implement it. It's harder, not a simplification. 
> Suddenly, whenever you are parsing any expression, you will 
> have to take into account the possibility that it is actually a 
> variable declaration. The way DMD deals with lvalues is also 
> ill-equipped to allow this to be added easily. Furthermore, you 
> now have to do proper scope handling for short-circuiting 
> operations.

It **is** implemented but not in **D**.

I see what would be the problem with D or rather I see what "you 
guys think" the problem would be. I think that this is wrong, 
it's not like if the parser does not already have to perform an 
arbitrary count of lookups in certain situations.


More information about the Digitalmars-d mailing list