4 ms·
Those are not new features. Those are relaxing limitations on existing features and making things more orthogonal. Rust already has had generics, now you can us
by pkolaczk 3y ago
Those are not new features. Those are relaxing limitations on existing features and making things more orthogonal. Rust already has had generics, now you can use them in more places consistently. Similar thing with `impl Trait` in traits.
- LoganDark 3y agoIf you know anything of the work that was required to ship those features, you know that "relaxing limitations" was not the difficult part. I know they did ship in multiple stages, and some of those were relaxing limitations (once edge cases were accounted for), but a lot of the work was refactoring large portions of the trait solver and related machinery in order to be able to express completely new concepts (const generics are not just "generics in more places", even though monomorphization may make it seem that way). The reason why they don't necessarily feel like new features is because they fit neatly into existing features, which is a good thing (we don't need another PHP). But they both took years to implement and were huge pain points for a very long time.
- pkolaczk 3y agoI’m not saying it was trivial to implement internally. But from the perspective of developers this is not a new feature, but a new ability to compose existing features. Also, their existence does not change how you write idiomatic code. Existing code still compiles and doesn’t need changes. Those features are pretty niche.
- LoganDark 3y ago> Existing code still compiles and doesn’t need changes. This will be true forever, because of Rust's stability guarantees. By this logic, Rust will never have any new features.