Automated translation from C++ to D
James Dunne
james.jdunne at gmail.com
Sun Feb 26 01:07:18 PST 2006
bobef wrote:
> 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...
My thinking exactly. If your brain can do it, a computer can too. The
effort involved out of the brain in order to coax the computer into
doing it is the question. =)
--
Regards,
James Dunne
More information about the Digitalmars-d
mailing list