On Tue, 25 Oct 2011 11:45:48 -0400, Gor Gyolchanyan <[email protected]> wrote:
another example is dynamic callbacks. You may carry around typeid of the function signature and a struct, containing parameter values for it, which also contains the typeid of it's target function's signature. If you don't impose type information on the typeless values, i will be able to check the types of the signatures (possibly by a hash value for efficiency) and i won't need to check the types of each parameter (since i'll be passing around array of typeless objects).
I'm confused. So delegate don't work because? What about unions? Or casting a ptr into an array of raw bytes? Do you call the callback like 'dg();' or 'dg(x,y,z);'? If the latter, what about implicit variable conversions? At some level, either you hold the type in the type system, or as a tag somewhere.
