4 ms·
If you consider the compiler to be part of the platform, that’s mostly true. I think the hard problem in practice is that headers and templates make for a very
by codeflo 5y ago
If you consider the compiler to be part of the platform, that’s mostly true.
I think the hard problem in practice is that headers and templates make for a very fuzzy boundary between library code and client code. Calling C++ from Rust already works fine for traditional OO code, but it’s hard to imagine that anything could ever use modern templated C++ code that isn’t a full superset of C++.
- vlovich123 5y agoIf I'm not mistaken you can mix'n'match shared libraries built by either compiler on Linux. I think that's also true for individual object files within the executable. Same is true for Windows. I can't recall the state on Darwin & I don't know the state of other platforms. I don't think templated C++ code needs to be a full superset of C++. For example, cxx provides bridged implementations for CxxVector. If cxx provided an easy-to-use mechanism to define your own bridging type without a lot of boilerplate, that could open up far more interop than is possible today.