How often does Rust change?
steveklabnik.com
steveklabnik.com
I think what people mean when they say the language changed isn't literally "the language changed". It's actually what the user is supposed to do changed: The idioms changed. The ecosystem changed. Code that I wrote two years ago still works but it looks foreign to new developers.
Whereas to me it seems like Rust's idiom changes have mostly been around using some new language feature to make certain cases a bit cleaner; that's about it. They've all been very cohesive and in line with the overarching philosophy, so I don't really see why the old way would look foreign to new developers.
Rust has the obvious seismic shifts like async, which are rare. But the community has a decent amount of "best practice churn" in some areas, like error handling, or async frameworks.
It helps with readability to have everything using the same idioms, and it helps with quality to have everything using the best idioms.
> Most of the time idioms change incrementally
Incremental changes stack up over time.
> the seismic shifts I can think of a) have happened pretty much only once in a language's life,
big changes happen much more often in new ecosystems
> and b) were basically an admission that the original language design was bad and/or insufficient in some way.
Yeah. If I'm considering whether to join a language, I want to know if they have so many unresolved problems that they're still fixing them all the time. Slowness is related to maturity.
> This analysis doesn’t get into something that I think is a huge deal: the ecosystem vs the language itself. I only track the Rust distribution itself here, but most Rust programmers use many, many ecosystem libraries. When people talk about churn in Rust, do they really mean the ecosystem, not the language? In some sense, doing so is correct: Rust having a small standard library means that you have to use external packages a lot. If those churn a lot, is it any better than churn in the language itself?
The reason I didn't pursue this more is that this is significantly harder to both quantify and get data for. As I said, it is a very important way to think about this problem though!
I think the only languages that don't look foreign are languages that are basically no longer developed because they basically don't have new developers / new projects at all. Fortran is a good example - the language hasn't changed much since 1990, but a new developer wanting to call existing routines in Fortran (like BLAS/LAPACK) would generally use a younger and more featureful language like Python (via NumPy), R, Julia, or even MATLAB. The same class of users who would have directly used Fortran some 20-40 years ago are writing their own code in an entirely different and foreign language today.
Part of the problem is that programming language design is still a very young field. Compare with musical notation, for instance. Music written a hundred years ago is perfectly readable to modern musicians; music written over about five hundred years ago in plainchant notation is learnable (a reader of modern music can pick it up in well under an hour of study, but won't be able to read it cold); music written over about a thousand years ago, is pretty unreadable without training. Meanwhile, programming languages date from the 1950s, and various language features are very new (syntactic async/await first appeared about a decade ago, for instance, and even the Liskov substitution principle is only about 26 years old). There are clear reasons to prefer the incrementally improved notations for both music and software - neither Guido d'Arezzo nor Guido van Rossum got everything right on the first try, even though their original notations are readable to practitioners today - it's just that we've already figured out musical notation we're happy with and there haven't been significant incremental improvements in music hundreds of years.
And there's been an explosion of modern (computer-based) musical notations recently... piano roll editors, MML, trackers, possibly 16-step sequencers as well...
Go. 10-year-old Go code looks much like Go written today. There really haven't been any significant changes to the language since 1.0 was released, and most of the idioms were discovered within the first couple years.
Generics will certainly create a big rift in this regard, which is one of multiple reasons why they make me sad.
A few key features landed and things more or less stabilized in the language - I don't recall anything super meaningful where I was like "ah nice, time to update my code". We got some helpers like `impl Trait`, but there was 0 reason to go back into most codebases to use it.
More recently the major change was with async/await. At this point, sure, you may want to go back to old code using old futures and update? So that's one major change in my entire time using Rust where I'd say "yeah, go back, bring stuff up to speed if you can".
I guess there's the new anonymous lifetime stuff, which I don't really think was that important to add tbh.
Most churn is in libraries, unsurprisingly. Tokio only just hit 1.0, but that does mean that from here on out we can expect much less churn there.
idk otherwise, nothing sticks out to me as a major idiom change. I don't think Rust code 2-3 years ago will be particularly foreign at all, again with the exception for when people used to use 'raw' Futures.
Where does rust with lots of dependencies (since that seems to be what cargo encourages) sit on the spectrum?
While we are allowed to break things in this way, we want it to feel as if it were literally 100%, so we often will do things like “warn instead of fail to compile for a very long time” before making changes, or “discover that an inference change breaks the ecosystem too much so back it out until it won’t anymore.”
Not that that's not addressable with tooling or feature limiting version flags.
Dozens[1] of JavaScript features and APIs are deprecated (they will be removed) or obsolete (they have already been removed).
1. https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe...
So if ECMA (or whoever now?) is okay with theoretically breaking some websites maybe thru should clean up more things like "with" and double equals.
If you take the average codebase from, let's say 2006, I would honestly put down money that under 25% would still run to this day.
While most churn that people complain about on the frontend now is "optional" churn, the first two decades were full of breakage. Not only are there wide swaths of APIs that have been rightly removed, there are even keywords that have been deprecated and aren't available in strict mode.
For Python (and JavaScript and most modern languages), security updates are mixed up with API changes. In some cases, security updates require breaking old code.
If the language has great static analysis, you get a handy guide of everywhere your code needs to change. For example, I have a C# code base that's now 5 years old and has survived through several major C# and .NET updates, and it was never more than 2-3 hours of work to just click and fix the compiler errors (JetBrains automates a lot of it, too).
Rust sounds like it has that benefit as well. The compiler is so good that broken code is easy to find and fix.
How might C code like this eventually fail, assuming future C standards remain backwards-compatible? Perhaps because C code is likely to contain (currently benign) undefined behaviour, which future compilers may take advantage of?
One thing that’s changed is I no longer write the release blog posts. (This author inconsistency is mentioned in the post)
They (we?) are the most concerned about changes, and the best suited to tell if async/await is a bigger feature than const fns.
I hope that you'll consider just writing out your point in plain language in the future, especially for people are not "in on" the joke or don't speak English as a first language.
Your "get off my lawn you dirty Redditor" attack is not at all appreciated, and more harmful to this community than the odd sprinkle of this sort of clearly highly technical and in-depth humour.
In hindsight I do agree that some more details could have been included for our friends who just need a little bit more context to connect the dots. Something I will keep in mind when possibly posting more content in the future.
With English actually being only a tertiary language for me, it is actually sometimes difficult to convey the right tone in written text. Perhaps you could be a bit more considerate and less quick to assume in that regard.