5 ms·
It feels like Rust is now 'stable'. Are there any major language related things in the pipeline?
by fxfan 8y ago
It feels like Rust is now 'stable'. Are there any major language related things in the pipeline?
- vvillena 8y agoAsync/await is probably the next "big" feature.
- steveklabnik 8y agoThe 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.
- sanxiyn 8y agoMy main interest is Polonius borrow checker and two-phase borrowing.
- 0815test 8y agoSteve Klabnik's comment has already mentioned async-await, "const" generics (much like template parameters in C++, expected to be especially useful for numerics-like code), generic associated types/GAT (related to higher-kinded types as found in e.g. Haskell) and specialization (allowing narrower, more specific trait implementations to override broader ones; a not-so-ad-hoc, more elegant approach to the overall, broad issue of implementation inheritance). On a different level, a lot of work has been planned to address compiler performance, improve IDE integration, and provide better support of special workflows e.g. for embedded development, or for WASM and the like. Work is also still ongoing on writing high-quality reference documentation for the language, and moreover for a better understanding of how exactly unsafe code should be expected to work, which in turn will enable a more formal approach to the Rust language as a whole.
- jeffdavis 8y agoThere have been steady improvements for the FFI and macro system and I hope that continues. Both of those are important for C integration.