Accessing C++ code from D

Rémy Mouëza Rémy_member at pathlink.com
Thu May 18 11:27:03 PDT 2006


IMO, Accessing C++ code from D is not a feature that should be supported by the
D compiler.
There has been some attempts to build C++ wrapper generators for D: swig, a
macro system and I even made one myself (but the memory management is ugly). We
just need  C void * pointers. There are (and will be) brilliant people who
(will) make great tools for D. The impatients (like me) can try to link with the
ones they used in C++. We need time. 
I also tried to make a C++ to D translator by modifying Peri's Hankey d2d
language machine script. It can handle small sized code and output quite
syntactically correct D code but the semantic is incorrect, especially for
templates because of the overwhelming "template <T>" syntax. I've given up for
the moment. A translator is not enough: a C++ compiler to D could eventually do
it but sounds like nonsense.
Being a successor of C++ doesn't means that D should support it. Java does not
support C++ and this lack has not prevent it to spread.





More information about the Digitalmars-d mailing list