C++ -> D converter mentioned in AMA

Tourist gravatar at gravatar.com
Thu Oct 3 04:31:50 PDT 2013


On Thursday, 3 October 2013 at 11:29:38 UTC, Szymon Gatner wrote:
> On Thursday, 3 October 2013 at 11:23:25 UTC, Dicebot wrote:
>> On Thursday, 3 October 2013 at 11:08:29 UTC, Szymon Gatner 
>> wrote:
>>> Thanks, I actually have VisualD installed but didn't know 
>>> about that functionality tho looking at the docs it is pretty 
>>> limited especially when it comes to templates :(
>>>
>>> Sorry to hear about Daniel's tool. Maybe some day...
>>
>> Expecting such tool to "just work" is very unrealistic. C++ is 
>> very complex language and some behavior just can't be mapped 
>> to D directly. For example, one issue with current DMD source 
>> translation is that in C++ you can split class implementation 
>> among different translation units. Not in D.
>>
>> Of course, libclang helps a lot with such tools (you don't 
>> need to write full C++ front-end on your own anymore!) but the 
>> complexity of translation is very high and you need to 
>> manually recheck it anyway so this does not seem like a 
>> feasible _generic_ tool, only something that can be adopted 
>> for specific projects.
>
> I fully realize that and actually I was really surprised that 
> such a tool is in production considering amount of code in DMD. 
> OTOH if it can work for DMD then in theory it should be 
> possible to (to some degree) reuse it on other codebase *if* it 
> conforms to certain coding rules/standard right?

An official reply from Daniel ;)
https://github.com/D-Programming-Language/dmd/pull/1980#issuecomment-19539800


More information about the Digitalmars-d mailing list