Before it's too late: delegate calling convention
Lionello Lunesu
lio at lunesu.remove.com
Wed Nov 1 08:00:42 PST 2006
Just thought I'd post this before it's too late (some will argue it
already is too late, but I don't think so):
Please make the calling convention for delegates compatible with the one
for functions. I want to be able to write my API using only delegates,
and allow users to pass also globals (function pointers) for callbacks.
The two workarounds currently are
* wrapping the function in a dummy delegate literal (I don't like having
to do this; it's not about the work, but it looks clumsy)
* provide an API using delegates and one using function pointers (much
like std.thread.Thread's constructor; needs extra code, for what?)
If I'd be asked to submit ONE issue for "to do before 1.0", this would
be it.
L.
More information about the Digitalmars-d
mailing list