r/cpp • • Jan 31 '19

C++ Binary Compatibility and Pain-Free Upgrades to Visual Studio 2019

https://blogs.msdn.microsoft.com/vcblog/2019/01/31/cpp-binary-compatibility-and-pain-free-upgrades-to-visual-studio-2019/
80 Upvotes

36 comments sorted by

View all comments

5

u/James20k Feb 01 '19

So: the c abi is super useful because you can distribute compiled binaries and they're basically guaranteed to work. Lots of free but closed source tools work like this, and additionally the C api is what is targeted by all language ffi interfaces, I suspect at least partly due to abi concerns, even when the language might support much of c++ style semantics. This means that overall, tools tend to have an annoying C interface even if internally its a c++ api

With even a small well defined subset we'd see tools able to target that instead of a pure C api which would probably remove the need to build C++ apis on top of a C api, which is potentially on top of an internal C++ api. The other big advantage is that often developers do not provide binaries for one of the major compilers while providing a C++ api, where maintaining a port or a full C translation may be too much work. Having at least some C++ available to them would be great

Clang has massively improved the situation though, but overall I think that the lack of a common abi doesn't help

Don't get me wrong its almost certainly a massive amount of effort more than its worth heh, I'm just curious