Why can't we transpile C++ to D?

Tejas notrealemail at gmail.com
Thu Jun 10 19:08:18 UTC 2021


On Thursday, 10 June 2021 at 16:49:59 UTC, Dukc wrote:
> On Thursday, 10 June 2021 at 15:09:02 UTC, Tejas wrote:
>> Sorry, I'm rather ignorant when it comes to this, but why 
>> can't we use 
>> [pegged](https://github.com/PhilippeSigaud/Pegged) to 
>> transpile C++ code to D? Then we won't need a nogc compatible 
>> std library and so many other things could get easier, like 
>> getting legacy code to use Dlang. It might not be worth it for 
>> C+17 and beyond, but older codebases could benefit 
>> significantly, right?
>
> This is article is about transpiling old C++ to newer C++, but 
> the same problem applies with translating C++ to D: 
> https://scottmeyers.blogspot.com/2015/11/the-brick-wall-of-c-source-code.html

Damn that preprocessor! :@


More information about the Digitalmars-d-learn mailing list