[D2] How to not full closure?

bearophile bearophileHUGS at lycos.com
Mon Jul 14 11:41:36 PDT 2008


BCS:
> > Wouldn't it suffice to overload the new keyword?
> > heap:
> > delegate t = new { return 3; }
> > stack:
> > delegate t = { return 3; }

Generally in D the default behavior must be the safer one, in this situation it means the heap version...

Bye,
bearophile



More information about the Digitalmars-d mailing list