"The last feature": scope structs

Walter Bright newshound1 at digitalmars.com
Sat Feb 13 19:16:00 PST 2010


Ary Borenszweig wrote:
> Why is this useful?

Many optimizations are possible if it can be unambiguously determined 
that an object's lifetime cannot exceed the lifetime of the function it 
is instantiated in.

By preventing taking the address of it, there's no way to escape a 
reference to it.



More information about the Digitalmars-d mailing list