4 ms·
I’m happy with the changes to rust and their pacing but I want to point out that merely asserting “you don’t have to use these features if you don’t want to” is
by ComputerGuru 7y ago
I’m happy with the changes to rust and their pacing but I want to point out that merely asserting “you don’t have to use these features if you don’t want to” is disingenuous and particularly so for open source contributors (Steve did NOT say this but it was a common refrain in the discussion that Steve is contributing to). It threw me for a loop the first time that I saw the spread operator in an assignment in a project I was filing a PR for, and I thought I was on top of all the features.
Some changes that stand out to me: the try macro being deprecated was huge, and though the ? Operator is a thousand times nicer, that was a rather radical shift to the ecosystem where you could smell code from yesterday a mile way; I seem to remember try blocks were stabilized then removed but I seem to be mistaken on that count; async of course is a huge change and it absolutely does force you to use it since it’s a contagious language feature in pretty much all languages (I’m very disappointed with tokio on this count and have a feature I’ll probably file a PR for to help reduce this); the change allowing reusing the same variable name inside a match binding as the variable being assigned to was hugely beneficial but quickly broke backwards compatibility because of how nice it was to give up. I think the changes to std::error are also worth mentioning, they might be backwards compatible but they completely obviated an entire generation of crates and coding styles (I for one do not lament the death of quick error and co).
I feel a better metric for this might be to study the min rustc version to compile libraries, i.e. community adoption of new or breaking changes. If you take the releases from the top 250 crates in the past few years and see how many rustc versions back from whatever was stable at the time of release could compiled the release, that might give you a more data-oriented result.
Also, I think some of the real frustration might be from “core” crate breakage, such as the transition from tokio 0.1 to 0.3 and the ensuing mess or examples like gfx-rs that hundreds of other popular crates built on to get OpenGL support before they completely deprecated it and pivoted altogether such that not all are those crates left based on a dead-ended project but OpenGL users are all SOL (“just a little while longer!”) as the community-adopted alternative is wgpu which requires Vulcan/Metal/DirectX until the promised OpenGL support lands there.
I’m not complaining; NIH people generally get off easy with community deprecation of popular crates ;) and OSS developers are absolutely not beholden to anyone. But I imagine for developers plugged into the ecosystem, changes to extremely popular crates and changes to the language or standard library might result in a general annoyance that doesn’t distinguish between the two (and that’s also fair since the reason rust has a small standard library is so people use crates which can be more easily replaced or deprecated).
- baby 7y agoThat something pro-generic people in Golang tend to miss: once you enable a feature it means everyone is going to try to use it. And this has consequences. And people should ponder more often on why Golang is so clean to read.
- hyperman1 7y agoBeware. Exactly the same thing is true for COBOL: Easy to read, very low abstraction, but you need tons of repetitive code for anything. A language that is too simple brings its own trouble.