Jump to page: 1 2
Thread overview
c++ to d converter or c to d
Dec 05, 2006
janderson
Dec 05, 2006
John Reimer
Dec 06, 2006
janderson
Dec 06, 2006
John Reimer
Dec 05, 2006
Justin C Calvarese
Dec 05, 2006
Walter Bright
Dec 05, 2006
Paul Findlay
Dec 05, 2006
Brad Anderson
Dec 06, 2006
janderson
Dec 06, 2006
Brad Anderson
Dec 05, 2006
Steve Horne
December 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
December 05, 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
December 05, 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
December 05, 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.
December 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
December 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.
December 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
December 06, 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
December 06, 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
December 06, 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
« First   ‹ Prev
1 2