News for hackers. Stuff that matters.
Re:Rust 1.34.0 by fxfan on Thursday April 11, 2019 @02:22PM (#19637580)
It feels like Rust is now 'stable'. Are there any major language related things in the pipeline?
Re:Rust 1.34.0 by steveklabnik on Thursday April 11, 2019 @02:29PM (#19637654)
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.

Re:Rust 1.34.0 by mintplant on Thursday April 11, 2019 @03:04PM (#19638057)
> 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.

Re:Rust 1.34.0 by Grollicus on Thursday April 11, 2019 @03:33PM (#19638291)
For people confused like me: GAT in this case means "Generic Associated Types"

https://rust-lang.github.io/rfcs/1598-generic_associated_typ...

Re:Rust 1.34.0 by seeekr on Thursday April 11, 2019 @04:01PM (#19638552)
This 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!
Re:Rust 1.34.0 by tijs on Thursday April 11, 2019 @04:21PM (#19638766)
Huh... Safari on iOS crashes on that page
Re:Rust 1.34.0 by steveklabnik on Thursday April 11, 2019 @04:35PM (#19638900)
Interesting, it doesn’t crash for me!
Re:Rust 1.34.0 by geogriffin on Thursday April 11, 2019 @03:28PM (#19638248)
I 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.
Re:Rust 1.34.0 by kibwen on Thursday April 11, 2019 @03:22PM (#19638208)
To help people follow along, GAT stands for Generic Associated Types.
Re:Rust 1.34.0 by sanxiyn on Thursday April 11, 2019 @03:04PM (#19638056)
I think another big item is const fn and compile time function evaluation.
Re:Rust 1.34.0 by steveklabnik on Thursday April 11, 2019 @03:07PM (#19638082)
That’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.
Re:Rust 1.34.0 by centril on Thursday April 11, 2019 @06:51PM (#19640094)
I 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.
Re:Rust 1.34.0 by sanxiyn on Thursday April 11, 2019 @03:39PM (#19638350)
In my mind const generics and const fn is a completely different feature. Proof: you can use const fn without any const generics.
Re:Rust 1.34.0 by steveklabnik on Thursday April 11, 2019 @03:42PM (#19638384)
Sure. 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.

Re:Rust 1.34.0 by mijamo on Thursday April 11, 2019 @03:24PM (#19638219)
You mean expanding and improving const fn? Because the basis of const fn are already in stable since 1.31 and improved in 133.
Re:Rust 1.34.0 by 0815test on Thursday April 11, 2019 @02:53PM (#19637928)
Steve 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.

Re:Rust 1.34.0 by vvillena on Thursday April 11, 2019 @02:24PM (#19637604)
Async/await is probably the next "big" feature.
Re:Rust 1.34.0 by pimeys on Thursday April 11, 2019 @02:42PM (#19637815)
We are really waiting for it in Prisma and might need to start working with the unstable soon until it lands.
Re:Rust 1.34.0 by sjroot on Thursday April 11, 2019 @02:58PM (#19637995)
Is Prisma releasing a client library for Rust?
Re:Rust 1.34.0 by pimeys on Thursday April 11, 2019 @04:01PM (#19638553)
We'll build the server first with Rust. Hopefully me or somebody else has time to do the library later. Would be fun, but right now all focus is on the server rewrite.
Re:Rust 1.34.0 by breerly on Thursday April 11, 2019 @02:27PM (#19637640)
^ this.
Re:Rust 1.34.0 by jeffdavis on Thursday April 11, 2019 @04:20PM (#19638750)
There have been steady improvements for the FFI and macro system and I hope that continues. Both of those are important for C integration.
Re:Rust 1.34.0 by sanxiyn on Thursday April 11, 2019 @02:50PM (#19637912)
My main interest is Polonius borrow checker and two-phase borrowing.