www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: Transients or scoped immutability


 Just use a delegate literal (with a fix to 5081).

This doesn't seem to satisfy two of the things I've written in the original post:
 - On the stack too, avoiding slower heap allocations and avoiding copying them
from the mutable to the immutable version;
 - Avoiding calls to functions that may contain loops that DMD doesn't inline;

I don't think a delegate solves the problem. Bye, bearophile
Apr 26 2011