Automated translation from C++ to D

bobef bobef at lessequal.com
Sun Feb 26 01:00:02 PST 2006


Hasan Aljudy wrote:
> Walter Bright wrote:
>> "Georg Wrede" <georg.wrede at nospam.org> wrote in message 
>> news:43FB4E35.5080606 at nospam.org...
>>
>>> Compile the C++ "half-way" (your choice of which passes), and then 
>>> translate that to D source code?
>>
>>
>> It would be nearly useless, because one has to adopt different 
>> algorithms.
>>
> 
> Why? Aren't the constructs pretty much the same?

Everything is the same. It is just bits in the memory, which is 
electricity, which is energy, which is everything...

> 
> C++ classes maybe a hell to parse, but it's possible (obviously has been 
> done), and they must be translatable to D classes!
> 
> Templates can be translated to templates (I assume ..)
> 
> variables to variables ..
> functions to functions ..
> 
> One thing that comes to mind is passing objects *by-value* but I think 
> it can be simulated with D structs? (D structs can be passed by value, 
> am I not correct?)
> 

I think the question is not is it possible. Of course it is, if your 
brain can do you, the computer can do it too. The question is does it 
worth the effort, and I believe the answer has been already given...



More information about the Digitalmars-d mailing list