Dynamic Closure + Lazy Arguments = Performance Killer?

Jarrett Billingsley jarrett.billingsley at gmail.com
Sat Oct 25 08:33:46 PDT 2008


On Sat, Oct 25, 2008 at 10:44 AM, Denis Koroskin <2korden at gmail.com> wrote:
> I also think that scope and heap-allocated delegates should have different
> types so that no imlicit casting from scope delegate to heap one would be
> possible. In this case callee function that recieves the delegate might
> demand the delegate to be heap-allocated (because it stores it, for
> example).

Fantastic.  That also neatly solves the "returning a delegate"
problem; it simply becomes illegal to return a scope delegate.



More information about the Digitalmars-d mailing list