4 ms·
The biggest one in the near future is async/await; you’ll see the precursors land in the next few releases. There will also be a blog post soon outplaying overa
by steveklabnik 8y ago
The biggest one in the near future is async/await; you’ll see the precursors land in the next few releases. There will also be a blog post soon outplaying overall plans for the year, but const generics, GATs, and specialization are the likely big-ticket items.
In general, this year of Rust will be about governance refactoring, finishing off long-desired features like the ones above, and general polish. There isn’t a lot of big plans for big new things coming anytime soon, more of finishing what we’ve started and improving what we have.
- sanxiyn 8y agoI think another big item is const fn and compile time function evaluation.
- steveklabnik 8y agoThat’s under “const generics”, but yes. Technically const fn is already stable, it’s just expanding what it can do, generally, so we tend to talk about them as one thing.
- sanxiyn 8y agoIn my mind const generics and const fn is a completely different feature. Proof: you can use const fn without any const generics.
- steveklabnik 8y agoSure. They rely on the same internals, which is why they tend to be wrapped together when talking about them as a feature, that’s all I’m saying. That also doesn’t change that const fn is stable today, so saying “it’s coming this year” muddies the waters a bit. You have to explicitly say “the capabilities of const fn will be expanded”, or you risk the wrong impression.
- centril 8y agoI think it's not a good idea to talk about them as one thing and the use cases also differ. `const fn`s are deterministic ("pure") functions that can be evaluated at compile time if all arguments provided also can. `const A: B` generics are about compile-time value dependent typing. The former is important for the expressiveness of the latter but they are ultimately independent. Moreover, the implementation effort is also mostly independent (different people are doing the effort). Even having them in the same WG might not be a good idea.
- mijamo 8y agoYou mean expanding and improving const fn? Because the basis of const fn are already in stable since 1.31 and improved in 133.
- mintplant 8y ago> GATs Oh, fantastic! I realize I'm probably in a very specific minority here, but I've been waiting on this one for literally years.
- kibwen 8y agoTo help people follow along, GAT stands for Generic Associated Types.
- geogriffin 8y agoI have ran into a couple places I needed GATs while writing abstractions, without realizing beforehand it'd lead to needing GATs. This is especially true with lifetimes, which I'm not used to thinking about as part of an abstraction.. I think it will naturally open up doors for everyone without anyone necessarily realizing it apriori.
- Grollicus 8y agoFor people confused like me: GAT in this case means "Generic Associated Types" https://rust-lang.github.io/rfcs/1598-generic_associated_types.html https://rust-lang.github.io/rfcs/1598-generic_associated_typ...
- seeekr 8y agoThis RFC has an explanation of Higher-Kinded Types that enabled me to understand what is meant by HKTs for the first time. Unexpected & awesome! Thanks for linking!
- tijs 8y agoHuh... Safari on iOS crashes on that page
- steveklabnik 8y agoInteresting, it doesn’t crash for me!
- deleted 8y ago[deleted]