A couple of extensions to `with` that would be worthwhile
deadalnix
deadalnix at gmail.com
Wed Oct 13 21:30:14 UTC 2021
On Wednesday, 13 October 2021 at 20:41:11 UTC, Paul Backus wrote:
> Of course one could work out a set of rules for this and add
> them to the language spec, but it seems like a lot of effort
> and complexity for not much benefit, especially when we can
> already get the desired behavior with normal block scopes:
>
This.
If the concern is that the temporary's destruction will destroy
the variable, it's a general problem that is tackled by ownership.
More information about the Digitalmars-d
mailing list