Walter Bright:

dmd could do a better job of escape analysis, and do this automatically.

Timon has kindly fixed the wrong part I wrote in the DIP60. But if we introduce some basic escape analysis required by all conformant D compilers, then the @nogc attribute can be applied to some functions that define array literals or more (so my comment becomes true in some specified cases). Thankfully this is something that can be done later, as such improvements just relax the strictness of @nogc.

Bye,
bearophile

Reply via email to