digitalmars.D - C++ to D Utility?
- AJ (1/1) Oct 22 2009 Is there a utility to convert C++ code to D code?
- dsimcha (8/9) Oct 22 2009 No. In theory it would be possible to write one, but it wouldn't be par...
- AJ (5/19) Oct 22 2009 OK. That shows that D is a drastic departure from C++. Why changes to co...
- Robert Jacques (3/4) Oct 22 2009 There are utilities that will wrap c++ code. And DMD supports limited
== Quote from AJ (aj nospam.net)'s articleIs there a utility to convert C++ code to D code?No. In theory it would be possible to write one, but it wouldn't be particularly useful, as its output would likely not be readable D code. Look at some of the C code output by language x to C compilers. It's not readable C. It's filled with gotos and no high-level constructs, etc. This analogy is relevant b/c D has a C-like subset and the higher level parts are the harder parts to target programmatically. Translating into *readable* code would probably require some program that passes the Turing test.
Oct 22 2009
"dsimcha" <dsimcha yahoo.com> wrote in message news:hbqbas$1hct$1 digitalmars.com...== Quote from AJ (aj nospam.net)'s articleOK. That shows that D is a drastic departure from C++. Why changes to code punctuation (i.e., semicolons) would matter in regards to "luring C++ programmers" is not apparent.Is there a utility to convert C++ code to D code?No. In theory it would be possible to write one, but it wouldn't be particularly useful, as its output would likely not be readable D code. Look at some of the C code output by language x to C compilers. It's not readable C. It's filled with gotos and no high-level constructs, etc. This analogy is relevant b/c D has a C-like subset and the higher level parts are the harder parts to target programmatically. Translating into *readable* code would probably require some program that passes the Turing test.
Oct 22 2009
On Thu, 22 Oct 2009 15:11:08 -0400, AJ <aj nospam.net> wrote:Is there a utility to convert C++ code to D code?There are utilities that will wrap c++ code. And DMD supports limited interfacing with c++ code compiled with DMC.
Oct 22 2009