New @safe rule: defensive closures

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Fri May 27 23:11:28 UTC 2022


On Friday, 27 May 2022 at 22:16:30 UTC, Steven Schveighoffer 
wrote:
> But what if instead, with DIP1000 seeing that, it just says now 
> we have a closure situation, and allocates `foo`'s frame on the 
> heap.

Object oriented languages has often used only closures 
conceptually (no assumptions about a contiguous stack), it allows 
for high degree of concurrency etc. It is a common strategy for 
high level languages, yes.



More information about the Digitalmars-d mailing list