How Nested Functions Work, part 1

Jarrett Billingsley jarrett.billingsley at gmail.com
Wed Sep 2 09:42:09 PDT 2009


On Wed, Sep 2, 2009 at 9:45 AM, Andrei
Alexandrescu<SeeWebsiteForEmail at erdani.org> wrote:
> Jarrett Billingsley wrote:
>>
>> Well repeat should probably always take a delegate since most likely,
>> you're going to be passing it a lambda. However I agree that it would
>> be very, very nice to be able to make APIs take just delegates and
>> allow functions to be implicitly cast to them. You can already make
>> your own thunks, but they're not going to be as efficient as something
>> that actually works on an ABI level.
>
> Did someone file a bug report on this?

Surprisingly, it doesn't seem like it. Walter himself, in the spec,
said that "Function pointers and delegates may merge into a common
syntax and be interchangeable with each other," so I just assume that
no one has found it necessary to make a report. Maybe there should be.



More information about the Digitalmars-d mailing list