with(auto x = ...)

Artur Skawina via Digitalmars-d digitalmars-d at puremagic.com
Sun Jul 26 09:51:10 PDT 2015


On 07/26/15 17:56, Idan Arye via Digitalmars-d wrote:
> On Sunday, 26 July 2015 at 14:49:40 UTC, Timon Gehr wrote:
> Well, no. That does not follow. We can have both a with statement and a with expression.
> 
> Mmm... but how will we differ them? 

There's no need for that. (hint: "mixin"). But, unlike
support for with-declarations (which would be a significant
improvement) I'm not sure if with-expression would make
sense (and the lifetimes might be too unintuitive --
they'd be different for with-statements and -expressions).

artur


More information about the Digitalmars-d mailing list