The most exciting component of this release is the const fn improvements. With loops and if available, you can now do non-trivial computation in const fn for the first time. It reduces the gap between Rust's const fn and C++'s constexpr to a large degree. Ultimately, the miri execution engine that this feature builds upon, supports a much larger set of features that even constexpr supports. It's been a project spanning years to get it merged into the compiler, used for const fn evaluation, and stabilize it's features (this part is far from over).<p>In addition to the linked examples, I have some code of my own which is made simpler due to this feature: <a href="https://github.com/RustAudio/ogg/commit/b79d65dced32342a5f9313960856114d88d50f4a" rel="nofollow">https://github.com/RustAudio/ogg/commit/b79d65dced32342a5f93...</a><p>Previously, the table was present as an array literal in C-style, now I can remove it once I decide for the library to require the 1.46 compiler or later versions.<p>Link to the old/current generation code: <a href="https://github.com/RustAudio/ogg/blob/master/examples/crc32-table-generate.rs" rel="nofollow">https://github.com/RustAudio/ogg/blob/master/examples/crc32-...</a>
I’m learning rust right now and there is a lot to like. Steady updates like this are also very motivating. The ecosystem feels very sane - especially compared to npm. Top notch Wasm support, cross compiling is a breeze.<p>That said, coming from a FP background (mostly Haskell/JS, now TS) Rust is... hard. I do understand the basic rules of the borrow checker, I do conceptually understand lifetimes, but actually using them is tricky.<p>Especially in a combinator world with lots of higher order functions/closures it’s often completely unclear who should own what. It often feels my library/dsl code needs to make ownerships decisions that actually depend on the usage.<p>Anyways, I guess this gets easier over time, right? Should I avoid using closures all over the place? Should my code look more like C and less like Haskell?<p><i>[edit] great answers all, providing useful context, thanks</i>
So, I want to learn Rust. I am a C# / Python programmer, experienced.<p>Are there any particular set of problems that I can solve systematically, so that I can learn all the features of Rust?
If anyone wants to know more about const fns, see <a href="https://doc.rust-lang.org/reference/items/functions.html#const-functions" rel="nofollow">https://doc.rust-lang.org/reference/items/functions.html#con...</a><p>It is the Rust way of specifying a function as being _pure_.
In other words the output is dependent only on the function arguments, and not on any external state.<p>This means they can be evaluated at compile time.
I suppose in the future, it could also allow better compiler optimizations.
Glad to see `Option::zip` stabilized. I tend to write such a helper in many of my projects to collect optional variables together when they're coupled. Really improves the ergonomics doing more railroad-style programming.
The quality of life improvements to cargo look very nice, and I feel that rust wouldn't be remotely as successful without such a tool. I'm very glad I won't have to be manually picking target directories out of my borg backups anymore when I'm running out of disk space.
Awesome! Any idea when relative links will be available in rustdoc? Seems like it's just on the edge of stabilizing (<a href="https://github.com/rust-lang/rust/pull/74430" rel="nofollow">https://github.com/rust-lang/rust/pull/74430</a>) but I'm curious how long it takes to see in a release after this happens.
> if, if let, and match<p>> while, while let, and loop<p>> the && and || operators<p>Common Lisp user here. Why just that? How come you can’t have the entire language as well as all your language customizations available at compile time for evaluation?
Can Mozilla layoffs (on Servo team) impact Rust future?
It is just s question to understand if there are others big rust project healty out of there. Just curious
`const fn` improvements are amazing!<p>I can't wait for when we'll be able to `const fn` all the things. Regex, expensive constants that feel as though they should be literals, etc.