core.stdcpp

Daniel Murphy via Digitalmars-d-announce digitalmars-d-announce at puremagic.com
Tue Aug 26 06:39:16 PDT 2014


"Ola Fosheim Grøstad" " wrote in message 
news:mclztlymyjydwhcxsepk at forum.dlang.org...

> Probably, at least without whole-program optimization turned on.

Linking with D is not a concern for whole-program-optimized C++ programs.

> But you still have to track compiler version changelogs and then deal with 
> possibly multiple D implementations just fro one compiler. I guess it can 
> work out if you limit yourselves to just std::vector and std::string…

Yes, it's a pain.  I've done it with one templated struct inside DDMD, and 
that was a pain.  I don't know if it will work sufficiently for mapping to 
stl, but it's worth a try.

It's usually easier to test with multiple versions and manually determine 
differences when problems arise.  Changelogs often do not cover anything 
more than API changes, especially with some vendors.

> This idea would have a more merit if DMD was 100% LLVM based and focused 
> on one architecture… Doing this for many compilers on many architectures 
> sounds like versioning hell.

It would be easier, but I don't think it changes the merit of the idea. 
Matching calling conventions is a much more difficult problem (in dmd's 
backend at least) and yet interoperability is so useful that it's 
worthwhile. 



More information about the Digitalmars-d-announce mailing list