Convert a delegate to a function (i.e. make a thunk)

Mehrdad wfunction at hotmail.com
Wed Apr 25 14:02:53 PDT 2012


It would be nice if there was a way to convert delegates to 
functions/thunks, because certain annoying tasks (e.g. 'WndProc's in 
Windows) would become a heck of a lot easier.

Is there any way to already do this? If not, how about adding a toFunction() 
method in std.functional?

(This would of course require making data executable, so that's why it's 
painful to get right. ATL uses a pool of some sort, I think... so if 
toFunction() did this internally, with a separate pool, it would reduce a 
lot of memory management burden from the programmer.) 



More information about the Digitalmars-d mailing list