Automated source translation of C++ to D
Joakim via Digitalmars-d
digitalmars-d at puremagic.com
Wed Aug 20 23:35:53 PDT 2014
C++ support keeps coming up these days, with Andrei continually
stressing it as something to work on. How hard would it to be to
write a C++->D translator, to allow people to translate C++
libraries to D?
I've been using tools like DStep and looking at libdparse, which
seem to work very well. I just translated a C sample app from
the Android NDK to D, fairly simple stuff like turning -> into .,
adding a default in a switch statement, rewriting casts from
C-style to D-style casts, removing the struct label, nothing that
couldn't be automated.
I'm sure there's stuff that'd need to be done by hand, but if you
can automate 97%, that's good enough. Could this be a viable
option for many cases?
More information about the Digitalmars-d
mailing list