New @safe rule: defensive closures
deadalnix
deadalnix at gmail.com
Fri May 27 22:25:37 UTC 2022
On Friday, 27 May 2022 at 22:16:30 UTC, Steven Schveighoffer
wrote:
> Currently, without DIP1000 enabled, this compiles, and if `bar`
> squirrels away the array, you have a memory issue.
>
The fundamental problem here, is that proving whether it
squirrels away or not is actually very difficult, and therefore,
you really don't want to rely on this, especially if the end
result is as drastic as making most functions closures.
More information about the Digitalmars-d
mailing list