Hacker News new | ask | show | jobs
by efficax 1375 days ago
sort of? when i first learned it there was no async/await, no `?` operator for simplifying error handling, and lifetime elision was a whole other story, and you seemed to need lifetimes for any reference (can't remember but it's much better now). But is that really enough change for a new kind of rust (instead of just say, learning async rust vs normal rust?). not sure.
1 comments

Isn't this what "editions" are supposed to handle, in part?
Editions are only necessary for otherwise-backwards-incompatible changes, to avoid breaking existing code. Even relatively major language features like the ? operator were shipped without an edition bump. But for example I think the await keyword itself was added as part of an edition, because it was incompatible with existing code that had a method named await.

The messaging around the 2018 edition was a little different here, with some attempts to use the edition release as an opportunity to advertise and summarize all the features that had shipped since 2015. But I think folks decided that was confusing, and with the 2021 edition the messaging was toned down.

Yes, that's a fair point about the actual purpose of editions being to handle forwards-compatibility.

Informally though, I think there are certainly a subset of people that use "Rust 2021" to mean all of the features included up to that point, even if it's not the precise definition.