digitalmars.D - c++ to d converter or c to d
- janderson <askme me.com> Dec 04 2006
- "John Reimer" <terminal.node gmail.com> Dec 04 2006
- janderson <askme me.com> Dec 05 2006
- "John Reimer" <terminal.node gmail.com> Dec 06 2006
- Justin C Calvarese <technocrat7 gmail.com> Dec 04 2006
- Walter Bright <newshound digitalmars.com> Dec 05 2006
- Paul Findlay <r.lph50+d gmail.com> Dec 05 2006
- Brad Anderson <brad dsource.org> Dec 05 2006
- janderson <askme me.com> Dec 05 2006
- Brad Anderson <brad dsource.org> Dec 05 2006
- Steve Horne <stephenwantshornenospam100 aol.com> Dec 05 2006
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. 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. -Joel
Dec 04 2006
On Mon, 04 Dec 2006 22:19:13 -0800, janderson <askme me.com> 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. 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. -Joel
Just curious, are you the Joel Anderson from Australia that was active on this list a couple of years ago? -JJR
Dec 04 2006
Just curious, are you the Joel Anderson from Australia that was active on this list a couple of years ago? -JJR
The same one. I'm now in San Francisco working for a game company called Perpetual. -Joel Anderson
Dec 05 2006
On Tue, 05 Dec 2006 19:39:54 -0800, janderson <askme me.com> wrote:Just curious, are you the Joel Anderson from Australia that was active on this list a couple of years ago? -JJR
The same one. I'm now in San Francisco working for a game company called Perpetual. -Joel Anderson
Great to see you around again! :) I remember how involved you were with D back then. -JJR
Dec 06 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
Dec 04 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.
Currently, the best we've got is htod, which will convert C header files to D import files.
Dec 05 2006
Lame dream of mine: Someone buys me http://www.semanticdesigns.com/Products/DMS/DMSToolkit.html?Home=SoftwareTransformation and I get to work. - Paul
Dec 05 2006
Paul Findlay wrote:Lame dream of mine: Someone buys me http://www.semanticdesigns.com/Products/DMS/DMSToolkit.html?Home=SoftwareTransformation and I get to work. - Paul
IIRC, the Language Machine is similar, but it's open-source, free, and written in D. http://www.dsource.org/projects/languagemachine BA
Dec 05 2006
Brad Anderson wrote:Paul Findlay wrote:Lame dream of mine: Someone buys me http://www.semanticdesigns.com/Products/DMS/DMSToolkit.html?Home=SoftwareTransformation and I get to work. - Paul
IIRC, the Language Machine is similar, but it's open-source, free, and written in D. http://www.dsource.org/projects/languagemachine BA
This is neat. I'll be sure to keep an eye on its development. -Joel
Dec 05 2006
janderson wrote:Brad Anderson wrote:Paul Findlay wrote:Lame dream of mine: Someone buys me http://www.semanticdesigns.com/Products/DMS/DMSToolkit.html?Home=SoftwareTransformation and I get to work. - Paul
IIRC, the Language Machine is similar, but it's open-source, free, and written in D. http://www.dsource.org/projects/languagemachine BA
This is neat. I'll be sure to keep an eye on its development. -Joel
It's pretty mature, so I don't think it's under active development. Peri Hankey maintains it, and will help you out if you ask. He did a bunch of work on a Java to D converter a few months back. BA
Dec 05 2006
On Mon, 04 Dec 2006 22:19:13 -0800, janderson <askme me.com> wrote:Legacy code is the biggest hurdle in getting D widely accepted. No-one is going re-invent years of work.
Someone should take a look at TXL and see what it can do. I got the link from http://www.cs.queensu.ca/~thurston/ragel/ where I've been getting all excited over the Ragel FSM / Scanner tool, and to a degree also the Kelbt parser generator, but this guy has also developed an extended TXL. I don't have any understanding of what it does beyond the vague sense that it can do intelligent computer-language translation tasks, but that is enough of a hint that it might be able to do the job, and as a bonus it is available for free. Even with a specialised tool, though, converting any meaningful subset of C++ to D automatically is going to be a tough job. Things that look similar actually have substantially different semantics. -- Remove 'wants' and 'nospam' from e-mail.
Dec 05 2006









"John Reimer" <terminal.node gmail.com> 