Except many people doing exactly that and it working fine.
> backwards compatibility problems
Which aren't really a problem in practice. Definitely not worse then in any other language, yes there was some intentional breakage (soundness bug fixes) and unintentional breakage (compiler bugs) but most of this was in the very early stable rust versions since then accidental breakage which isn't caught and fixed before stable has become quite rare. As far as I know rust does more to find accidental breakage then many other languages.
> They always use $latest and what is in $latest changes so fast even if your rustc is 4 months old it already can't compile code written in $latest.
What is the problem with requiring a up-to date build chain? Slow long release cycles with a lot of patch back-porting is a software development model which for many (most?) projects has been deemed to not work well and has been replaced with something more in the direction of CI. Let's be honest even if we assume slow long releases are better for compilers, they still put quite an additional burden one the compiler development process which a is feasible if you have a lot of payed devs from large companies, but not really if only your core devs are payed (by the foundation and/or companies) but a lot of relevant contributions come from people not directly payed to work on rust.
> But right now it's painful and full of pitfalls.
I don't think so, but I guess we both can agree that thinks are improving, for me to make it even better and for you to maybe make it usable for the things you currently treat it as not suited for. ;-)
Well, Debian Bullseye, a distro that hasn't even been released yet, already has a rustc that's so out of date (ie, ~5 months, 1.48) that it can't compile code written today using today's features. I guess if you come from the web or some "fast" internet company where you rebuild your entire world every day then 5-6 months is an eternity. But with, say, c++, I can expect to be able to compile C++ programs written by devs for a handful of years before C++?? issues start. And despite Bash 5 getting new features regularly I can expect a bash script written today to work on my 15 year old desktop running linux 2.6. It's not because these languages don't add new backwards incompatible features. It's because the devs don't immediately use them and say, "What is the problem with requiring a up-to date build chain?"
If you only talk to other bleeding edge devs in the rust community I can see how this ethos propagates. But not everyone is a bleeding edge rust dev. Some of us run our distros for many years and just want to compile programs.
Requiring the use of rust-up instead of using system repos is the often suggested way around this. But I, and many others, absolutely hate using third party compiler software from out of repos. It's a bad practice and leads to it's own trouble as shown the very topic this discussion thread is about.
It's not a problem of running rust code, you always can run any "latest" compiled rust code with Debian Bullseye. Only for building the binary do you need a up to date version.
But this isn't uncommon for a lot of projects which might require up to date build tools for them to be build.
I my opinion, and I know many do disagree with me, the problem is the idea of pinning dev-tools when releasing a distribution and expecting this to work well. In my experience it doesn't, and it's not limited to rust or web-related things where it doesn't work well.
(Like e.g. I don't know how often I had to install newer versions of clang, gcc, C++-related build tools, python related build tools, system dependencies, java etc.)
Sadly, Debian does this a lot - Bullseye is going to release with NodeJS v12 which is already in Maintenance LTS (dying) and not the Active LTS (v14) and has 4 more newer Current releases (15->18). I am a Debian supporter but this is a distro problem of locking in on already out of date dev tools over and over again, Bullseye is already far out of date before it's even launched.
https://packages.debian.org/search?keywords=nodejs&searchon=...
This sounds more like an argument against Debian’s packaging practices than Rust. Debian is full of out-of-date tools, and that and CentOS doing the same are the reason non-system package managers are so popular.
- Node.js
- Python
- Go
- Rust
- C++
- .NET Core
- Java
None had an up-to-date version in the distribution repositories. It’s a problem - and for those who defend it as otherwise while lamenting the rise of Docker, perhaps it’s worth some careful introspection about what a majority of people actually want from an operating system distribution, and whether the concept is in fact a relic of the days when software was distributed on CDs via the mail.
> None had an up-to-date version in the distribution repositories.
Of course not. A Debian release is meant to not change – except for security fixes – for the duration of its 2 year cycle. That's a feature, not a bug.
Operating systems are servant of their applications, not vice versa.
> This is what Debian's Stable name means: that, once released, the operating system remains relatively unchanging over time. [1]
If you just want to compile programs, perhaps a distro + release channel geared towards production server deployments isn't the best choice. They even call out that fact in the "Why Debian" page:
> You can fine-tune the degree of risk you want to take, since Debian has three separate releases: Stable, Testing, and Unstable. On some of our machines (the server, the kiosk machines) we run 'stable'. Some of the other systems (individual work-stations) run various combinations of testing/unstable. (Note that there are no security updates for testing). I run some stuff from experimental on my own work-station. What's great is the ability to make finely graded decisions for different machines serving different functions. But even the more adventurous choices are solid enough that they virtually never break. And `stable' just never breaks ;-). [2]
[1] https://wiki.debian.org/DebianStability
[2] https://wiki.debian.org/WhyDebian#Why_Linux.3F_Why_Debian.3F
My Rust 1.0 code on the other hand has compiled just fine since the dawn of stable rust.
The only really stable languages might be C89, C99, some fortran, and Cobol.
I think the Rust team does a fantastic job of supporting old code bases with new compilers. Crater is a testament to how much they care in fact.
As for another ancient Rust project which was also on 1.0 when I was trying the language out, the borrow checker on 1.52.1 screeched at every line of my code.
While C++ is just as bad, the fact that Firefox must always use the latest Rust compiler gives you a hint that it will not work on lower versions; hence the need of a MSRV. (Minimum Supported Rust Version)
Of course, without more info nobody can tell which of these or even whether it is one of these two or something else.
The only real pain we felt was around iOS bitcode and that was mainly Apple's fault because they make the whole process so Byzantine if you aren't using clang.