4 ms·
Wat? Rust has been a very stable language since Rust 1.0. They have a stellar record of keeping things working - with most code breaking being due to said code
by roblabla 4y ago
Wat?
Rust has been a very stable language since Rust 1.0. They have a stellar record of keeping things working - with most code breaking being due to said code invoking UB. The edition system is a brilliant invention that allows evolving the language _without_ causing an ecosystem split. Thanks to this, Rust ends up having a much better stability story than even C++ (for whom you can't really mix and match different C++ versions).
The bootstrapping situation is really not that bad? We have mrustc (A C++ rust->C transpiler) which allows compiling modern versions of rustc (latest supported rustc version being 1.54), which we can then iteratively bootstrap from up to the latest version. And things are getting better, with gccrs[0] in particular promising a rust frontend for GCC, written in C.
As for the "curl something|bash", I suppose you're talking about rustup. You're free to download the script, and review it before installing it. And rust is also distributed many different ways. At least `curl something|bash` does not require root account, unlike `sudo apt install`, which can be very convenient. Like all things: Multiple options are generally better.
[0] https://github.com/Rust-GCC/gccrs https://github.com/Rust-GCC/gccrs
- kldx 4y agoWhat do you mean by different C++ versions can't mix? Language, standard library implemention or something else?
- tialaramex 4y agoTry it. Here's a completely reasonable line of C++ 17 code: int concept = 4; Now here's a completely reasonable line of C++ 20 code: template <class T> concept delicious = true; Huh. You can't have those in the same project because C++ 20 believes you can't name a variable "concept" and C++ 17 believes "concept" is an identifier and so you can't write your delicious concept template. These are both valid C++, it's just that they aren't simultaneously valid in any of the half dozen distinct versions of standard C++.
- zozbot234 4y agoC fixes this by using _Concept as the keyword and sticking a #define concept _Concept in a separate stdconcept.h header file. Or maybe it was about complex or whatever, but same deal.
- kldx 4y agoThanks for the example. Is it considered UB to compile the first example with -std=c++17, the second one with c++2a and link them together?
- fmajid 4y agoRight, so you basically have to replay nearly the entire history of Rust versions since 1.54 (that’s what, 6 or 7 stages?) to bootstrap. Compare this to Go, where there is a stable version of Go 1.4 for bootstrapping, and the current Go 1.18 compiles on it, as opposed to only the previous version of Rust in rustc, so 2 stages, or Zig which can be bootstrapped in a single phase, I believe. That is what I call lack of stability.
- kouteiheika 4y ago...and why should I care that it's somewhat more inconvenient to bootstrap the compiler from scratch? No, seriously, why? What I care about is that the code I wrote on Rust 1.0 still compiles on Rust 1.60. And I do still have code from back then (I started writing Rust just before 1.0 hit) and I can confirm that it still compiles. Yes, I know it sucks for all of the distribution maintainers who want to bootstrap every package from scratch, and I do feel for them, but that's a very niche thing to do which the vast majority of people will not do.