c++ to d converter or c to d

Justin C Calvarese technocrat7 at gmail.com
Mon Dec 4 23:31:47 PST 2006


janderson wrote:
> Lame question 343242#
> 
> Has anyone written a c++ to d converter (I'm not talking about wrapping 
> a lib, I'm talking about the syntax)?  I'm not volunteering however I 
> was thinking if it was made easier to convert c++ to d people may be 
> more likely to switch over.

I don't think that anyone has created such a tool (yet). The closest 
thing that I can think of is BCD (http://www.dsource.org/projects/bcd), 
but I guess it creates bindings from .h files rather than converting C/C++.

I've heard that some great strides have been made in automating 
conversion of Java to D. But C++ can get much more complex, so trying to 
automate conversion could be a lot more hazardous.

> If not I'm sure it would be a challenge however if it could do 90% of 
> the work (and perhaps even automatically download the dependent 
> libraries from a webpage and convert stl over to d's form) people would 
> be able to say, "hay I converted our project to d on the weekend, its 
> 50% in code size and runs just as fast, why don't we switch over and 
> improve our productivity."  Well thats a just a dream, but it would help 
> I think.
> 
> Legacy code is the biggest hurdle in getting D widely accepted.  No-one 
> is going re-invent years of work.

-- 
jcc7



More information about the Digitalmars-d mailing list