www.digitalmars.com         C & C++   DMDScript  

D - Delegates revisited


One thing that has always made me wonder when I see delegates (pointers to
member functions): why not allow delegates be assigned static member
functions or regular non-member functions? The way it could work is that the
pointer to the object inside the delegate be set to null and, when the
delegate is invoked, a run-time check is added to use proper call
semantics.What do you all think?

May 30 2003