5 ms·
Particularly thunderous applause for providing both backwards compatibility (published packages will keep working, won't require anything from maintainers, and
by ronjouch 8y ago
Particularly thunderous applause for providing both backwards compatibility (published packages will keep working, won't require anything from maintainers, and we can mix old and new) and autofix features (for when maintainers are willing to make the breaking changes).
Glad Rust learned from breaking changes hiccups of other programming languages :)
EDIT see discussion with kibwen below: fixed forward compat to backwards.
- kibwen 8y ago> published packages will keep working and won't require anything from maintainers That's backwards compatibility: new versions of the compiler will continue to be compatible with code that was written previously. Forwards compatibility would mean that new code would be compatible with old versions of the compiler (this would be analogous to a website from 2018 working in IE5, or being able to play The Last Of Us on PS1). Rust's backwards-compatibility promise ensures the former, but not the latter. That said, if you stick edition=2015 in your crates, that might go a liiiiitle bit towards keeping your code compiling on old versions of rustc, allowing you to partially "opt-in" to forward compatibility for your users, if you so chose. Though this would only keep you from accidentally using things that are edition-specific; remember that when you use a version of rustc from here on out, if you compile with the 2015 edition, you're not just getting a version of the compiler frozen as of last month; code compiling with the 2015 edition will still be receiving most of the same features as the 2018 edition (a strict subset, obviously; they're still the same compiler under the hood, only the frontmost of the frontend diverges).
- ronjouch 8y agoRight! Thanks, wasn't sure about that, that's why I detailed what I meant between parenthesis. Updating my post.
- kibwen 8y agoNo problem, they're really rather unintuitive terms. :) I thought it was a bit funny that I made almost the exact same comment here a month ago: https://news.ycombinator.com/item?id=18392855 https://news.ycombinator.com/item?id=18392855
- nindalf 8y agoI always get them mixed up. From now on I’m going to remember it with the example you gave. Forward compatibility = The Last of Us on PS1
- steveklabnik 8y agoadding the edition 2015 key will harm your ability to compile on older rusts, as they don’t understand the edition key. Just leaving it off as the default is better.
- kibwen 8y agoAh, very good point! I was imagining the case where some does `cargo new`, which will give them `edition=2018` automatically, and didn't consider that you could just delete that line rather than editing it. :)