3 ms·
I thought, yeah that's just feature gated stuff. It's just marketing but my code will break even if I don't use the new edition because my dependencies will use
by egnehots 8y ago
I thought, yeah that's just feature gated stuff.
It's just marketing but my code will break even if I don't use the new edition because my dependencies will use it.
Turn out that it's false. What's amazing is that the compiler ensures that projects using the legacy edition can still use libraries relying on the new edition.
that if you’re using Rust 2018, you can use dependencies that use Rust 2015 with zero problems. If you’re sticking with Rust 2015, you can use libraries that use Rust 2018. It all works together
That's great!
- epage 8y ago> Turn out that it's false. What's amazing is that the compiler ensures that projects using the legacy edition can still use libraries relying on the new edition. To add on top of this is the amazing work to make this work even for Macros!
- xfer 8y agoNot sure why you would think that, it also works the same in C/C++ world.
- epage 8y agoYes, most C++ compilers let you specify your language version. One of the problems with C++ is there is less of a dependency management story around it. - Maybe staticlibs will let you mix language versions? - Maybe DLLs will (granted you probably shouldn't have C++ in your ABI anyways)? - headers-only or vendored libraries won't allow mixing language versions. Contrast this with Rust where all of the standard approaches for declaring a dependency allow different language editions.
- pcwalton 8y agoNot really, because libraries have headers that have to be textually included into your source. Because they're pasted in as far as the compiler is concerned, you have to pick one version of the language to compile your app and all the included headers with.
- the_why_of_y 8y agoDo tell, how do I use boost libraries that require std::auto_ptr, std::unary_function etc. in my C++17 code?