A couple of extensions to `with` that would be worthwhile

Adam D Ruppe destructionator at gmail.com
Wed Oct 13 19:28:05 UTC 2021


On Wednesday, 13 October 2021 at 19:18:55 UTC, Andrei 
Alexandrescu wrote:
> The point is that with keeps the entire expression live, even 
> if you only care about a part of it:

OK, that explains things now. I see what you're going for.

Not in love with it being `with` that works differently than the 
other `with`s but it kinda makes sense anyway.

The lambda pattern though does have a few other advantages... I 
think it is generally easier to use... but gotta chew on it a bit.


More information about the Digitalmars-d mailing list