[DGD] closure simulation under dgd
Carter Cheng
cartercheng at gmail.com
Wed Feb 5 14:03:22 CET 2014
Hello Dworkin,
I am curious if it would be possible to implement something along the lines
of function pointers + function expressions under dgd via hacking the
driver and how much work it would be. It seems like it should be possible
to construct a special type of object function object which holds the
details of the function and have the closure initialized to certain values
when it is created and then use the closure the same way one would call
ob->foo on an object.
My main problem is I am somewhat unfamiliar with how dgd stores data (is
most of the code in sdata.c?). I assume if I tried to do this I would have
to make a degenerate custom control block with a special type that cannot
be called directly via call other.
Regards,
Silenus
aka Carter Cheng.
More information about the DGD
mailing list