Python-like Use of the Comma Expression

Basile B. b2.temp at gmx.com
Fri Aug 11 01:28:51 UTC 2023


On Thursday, 10 August 2023 at 21:38:25 UTC, Basile B. wrote:
> On Thursday, 10 August 2023 at 19:39:46 UTC, Timon Gehr wrote:
>> On 8/10/23 17:47, Basile B. wrote:
>>> [...]
>>
>> Well, I think that should be a separate proposal, but it's 
>> syntactically compatible. In any case, I would strongly prefer 
>> to be able to still do `auto (x,y) = t;` in addition to `(auto 
>> x, auto y) = t;`
>
> whe have var decl syntax for `if`, since recently for `while` 
> too... It's pretty clear that "in situ" variable decls are 
> required...unless D continues on making special cases.

See https://dlang.org/spec/statement.html#if-statement.
That's just silly. IfCondition could just be an expression.


More information about the Digitalmars-d mailing list