A couple of extensions to `with` that would be worthwhile
Paul Backus
snarwin at gmail.com
Wed Oct 13 13:20:02 UTC 2021
On Wednesday, 13 October 2021 at 13:16:36 UTC, Basile B. wrote:
> I think that the point of proposal 1 is to have something like,
> after lowering to common AST constructs:
>
> ```d
> {
> {
> auto xpath = ....;
> scope (exit) destroy(xpath)
> // stuff
> }
> // destroy(xpath) really happens here
> }
> ```
Destructors are already called automatically at the end of a
block scope.
More information about the Digitalmars-d
mailing list