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

MrSmith mrsmith33 at yandex.ru
Wed Oct 13 12:45:37 UTC 2021


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;
```




More information about the Digitalmars-d mailing list