On Fri, 13 Jul 2012 15:46:35 -0400 Kevin Cox <[email protected]> wrote:
> On Jul 13, 2012 3:45 PM, "Nick Sabalausky" < > [email protected]> wrote: > > > > Am I correct in my understanding that we still don't have a reliable > > tool to translate a D source to C or C++? Can LDC/GDC do anything > > like that? (Doesn't LLVM have a C-outputting backend?) > > > > Yes LLVM does. I think GCC can do something like that too. AFAIK > this is the only way to do it. > Oh cool. Anyone know anything about the state of it? Ie, this is the use-case I had in mind: Currently using Marmalade (a C++-based system, uses basic classes/inheritance, but nothing too fancy) on Windows to develop iOS/Android stuff. Everything needs to be C/C++ (Marm's build system is unfortunately closed-source and tied to a specific set of C/C++ compilers). Ideally, it'd be fantastic if I could write my derived classes and such in D and just machine translate to C++ as a pre-build step. Although I suspect that's hoping for too much. So even just implementing certain non-class functions in D, translated to plain C, could be helpful. Any idea if it's up to this yet, or if not, what shortcomings there would be? Or staring points? (I haven't even used LDC or LLVM yet.) I'm sure anything using GC would be out of the question, of course. (Apologies, it's occurring to me know I probably should have put this whole thread in D.learn...)
