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

Andrei Alexandrescu SeeWebsiteForEmail at erdani.com
Wed Oct 13 19:22:58 UTC 2021


On 2021-10-13 8:45, MrSmith wrote:
> On Wednesday, 13 October 2021 at 11:13:32 UTC, Andrei Alexandrescu wrote:
>> 3. Accept `with` with colon:
>>
>> with (auto xpath = extendPath(name).str):
>>
>> The meaning is like a scoped `with` that extends though the end of the 
>> scope.
> 
> Isn't this equivalent to:
> 
> ```d
> auto xpath = extendPath(name).str;
> ```
> 

Sadly no:

https://run.dlang.io/is/Ja1uVk




More information about the Digitalmars-d mailing list