News for hackers. Stuff that matters.
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.