Automated translation from C++ to D

Georg Wrede georg.wrede at nospam.org
Tue Feb 21 09:30:29 PST 2006


On Feb 3, in this newsgroup, Walter wrote:

> 1) It's written in Java, which is the easiest code to translate to D
> besides C, perhaps even easier (no macros <g>). Furthermore, Kris has
> written a tool to automate some of the translation. Automated
> translation from C++ is essentially impossible.

Hardly anybody would disagree there!

But, (hey, it's me talking, what can you expect? ;-)  ) since you have 
both a C++ compiler and a D compiler, would the following tack cut it:

Compile the C++ "half-way" (your choice of which passes), and then 
translate that to D source code?

Mind you, I'm not suggesting you'd do this for real, heck you've got 
other things to do. This is mostly academic.

Would there be any very different issues if this is done using Digital 
Mars compilers versus GCC?



More information about the Digitalmars-d mailing list