[Issue 5710] cannot use delegates as parameters to non-global template

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Nov 18 03:43:02 PST 2013


https://d.puremagic.com/issues/show_bug.cgi?id=5710



--- Comment #30 from David Nadlinger <code at klickverbot.at> 2013-11-18 03:42:49 PST ---
(In reply to comment #29)
> #1 is necessary for the multiple-context delegates. But applying same rule for
> existing one-context delegates will add hidden runtime cost against existing
> code.

I don't quite see why the behavior for existing delegates should change. The
interpretation of the context argument is up to the callee. The only
requirement is that the caller knows how to construct it, for the rest of the
world it's just an opaque pointer. So, I don't see a reason why the new scheme
can't decay to the old one as an optimization, if possible.

I haven't looked at DMD's implementation in any detail, but at least for LDC,
the required adaptions would be rather straightforward.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list