Safer casts

Yigal Chripun yigal100 at gmail.com
Sun May 11 18:34:11 PDT 2008


Yigal Chripun wrote:
> hmm... you're right... :(
> maybe there is a way to adapt that way of thinking to D or maybe this
> would be optimized automatically by the liker in the future, as you say
> all i can say is that I hope the linker will be worked on...

(light-bulb)
since D has Object from which all the classes inherit (unlike C++) the
same idea I previously suggested could be employed, only instead of
void* use Object.
again, since it is buried inside the implementation, you still get
proper generic interfaces and classes. this sounds even cleaner than
void*. what do you think?



More information about the Digitalmars-d mailing list