|
|
Subscribe / Log in / New account

Rust 1.65.0 released

Version 1.65.0 of the Rust language has been released. Improvements include generic associated types, a new let...else statement, and the ability to break from labeled blocks:

Plain block expressions can now be labeled as a break target, terminating that block early. This may sound a little like a goto statement, but it's not an arbitrary jump, only from within a block to its end. This was already possible with loop blocks, and you may have seen people write loops that always execute only once, just to get a labeled break.


to post comments

Rust 1.65.0 released

Posted Nov 3, 2022 18:06 UTC (Thu) by roc (subscriber, #30627) [Link]

GATs are really important for Rust because they enable new ownership strategies and new kinds of polymorphism ... polymorphism over smart pointer types is really nice.

However my favourite change in this release is actually "let ... else" ... I've written so much code that would be more readable with "let ... else"!

Rust 1.65.0 released

Posted Nov 3, 2022 18:17 UTC (Thu) by mb (subscriber, #50428) [Link] (4 responses)

This is an important release and a really big step forward.
These features will improve the readability of Rust code by a lot.

Rust 1.65.0 released

Posted Nov 3, 2022 20:06 UTC (Thu) by zaitseff (subscriber, #851) [Link] (3 responses)

Pardon my ignorance of the Rust development process: when a new version of Rust is released with such new features (which do hopefully make code more readable), is the Rust Standard Library simultaneously updated to use these new features? Or is it a more gradual process that potentially might never happen?

Rust 1.65.0 released

Posted Nov 3, 2022 20:16 UTC (Thu) by tchernobog (guest, #73595) [Link]

Typically a gradual process. Usually features land in nightly Rust first, so that they can stabilized and be tried out on stdlib too before landing in stable at regular intervals. So it's kind of a synergy.

GATs are likely to be adopted quite fast, especially for things such as iterators, given that certain things were simply not possible to express satisfactorily before, or without a lot of workarounds. For an article listing some workarounds that were necessary before, see https://lukaskalbertodt.github.io/2018/08/03/solving-the-...

Things such as break from labeled blocks... well, they are kind of syntactic sugar anyway, so there's no big push there.

Rust 1.65.0 released

Posted Nov 3, 2022 22:08 UTC (Thu) by atnot (guest, #124910) [Link]

The rust feature development generally follows a number of steps, from proposal to implementation to stabilization, the point of no return. So the politics involved mean that for better or worse (usually better, I think), features will relatively rarely land in the same releases as a feature they depend on.

For example, one can look at the async ecosystem: When async was first added, the only support for it was the external futures crate. Only later, as confidence in the fitness of that implementation grew, did the relevant features land in the standard library.

Rust 1.65.0 released

Posted Nov 4, 2022 19:41 UTC (Fri) by khim (subscriber, #9252) [Link]

> Pardon my ignorance of the Rust development process: when a new version of Rust is released with such new features (which do hopefully make code more readable), is the Rust Standard Library simultaneously updated to use these new features?

No. It's similar to Linux Kernel process: first some foundational code lands, then things which rely on it land.

In particular this release doesn't expose any GAT-using APIs.

> Or is it a more gradual process that potentially might never happen?

After feature is enabled in the language third-party crates may test it. After it's tested in third-party crates it's brought to std. But some features stay in that mode for years

Rust 1.65.0 released

Posted Nov 4, 2022 11:03 UTC (Fri) by scientes (guest, #83068) [Link] (4 responses)

I can see that the corruption of Mozilla Pocket has reached Rust when they decide that Rust should be whining and crying to mommy about foreign affairs of the US empire implementing terrorism and coup de ta in the Islamic Republic of Iran.

Exact opposite of RISC-V which decided to completely divest from the US empire because of unnecessary political baggage involved.

Rust 1.65.0 released

Posted Nov 4, 2022 15:15 UTC (Fri) by larkey (guest, #104463) [Link]

How ironic that this hateful message tries to appeal "educated" by misspelling coup d'état.

Rust 1.65.0 released

Posted Nov 4, 2022 20:51 UTC (Fri) by roc (subscriber, #30627) [Link] (2 responses)

Preferring to keep software projects strictly apolitical is a defensible option, but the Rust folks understand that the grievances of millions of young Iranians could not be an invention of the CIA, and doing the bare minimum to draw attention to those grievances shows good intentions, not corruption.

Rust 1.65.0 released

Posted Nov 5, 2022 16:28 UTC (Sat) by scientes (guest, #83068) [Link] (1 responses)

Excuse me, but Hassan Rouhani issued a statement a long time ago that the police would not be involved in implementing religious law. It was top news. This is an attempt to revive the past, and unlike the recent Chinese coup d'etat attempt to oust XI XInping (or the CIA revolution attempt in Kazakstan last year, which brought in the CSTO to defend government industrial buildings), this false flag operation was not immediately crushed.

It also looks almost the same as Saudi Arabia hate, and they have DEFINITELY been showing how much they LOVE the US recently, and just want to bend over backwards and take Uncle Sam's penis whenever Uncle Sam seeks to destroy yet another country.

Stop here

Posted Nov 5, 2022 16:35 UTC (Sat) by corbet (editor, #1) [Link]

Regardless of one's opinion on the topic at hand or how you express yourself, this is far off-topic and inappropriate for LWN. This account is now moderated; everybody else please just let this end here.


Copyright © 2022, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds