News for hackers. Stuff that matters.
Re:Changing the Rules of Rust by vimpunk on Sunday September 17, 2023 @11:12AM (#37545879)
What parts of Rust would you like changed, though?

I think the current version, with its minor warts, is a very pleasant and consistent experience for the most part -- very much unlike C++. So I'm not sure what I'd change to such a drastic degree that it'd require such breaking changes.

Re:Changing the Rules of Rust by lawn on Sunday September 17, 2023 @11:42AM (#37546271)
async still feels half-baked and not pleasant like the rest of the language.

Now, it may be something that still can be fixed and improved upon, but a Rust 2.0 with nicer async experience would be a big win.

Re:Changing the Rules of Rust by Taek on Sunday September 17, 2023 @12:01PM (#37546476)
I would definitely want to see async totally overhauled. Also it would be great if major components of the standard library were all version 1.

And if I want to risk going too far, I'd also advocate for refactoring the type system to be slightly less generic in favor of chasing faster compile times.

Also, ideally the lead designer of SafeLang2.0 would be much more heavy on engineering experience than PL theory. Rust made a lot of tradeoffs that were beautiful in PL theory but are annoying to use on a day to day basis.

I honestly think rust is equal parts amazing ideas and mediocre ideas, and I think a slighky less ambitious language would still be almost as safe (world class compared to any other language) but 10x more fun to use.

Re:Changing the Rules of Rust by gmnash on Sunday September 17, 2023 @01:19PM (#37547336)
A complete overhaul of async sounds nice in the abstract, but without exact details it’s difficult to see how it would be better than what exists.

Similarly, I’m curious as to what the details of a “slightly less generic” type system entails.

Re:Changing the Rules of Rust by thayne on Sunday September 17, 2023 @03:53PM (#37548718)
Besides the Move and Leak traits mentioned in this article, there are several changes I would make to the standard library if backwards compatibility wasn't a concern, including:

Changing Iterator to make use of Generic Associated Types.

Change std::env::set_var to be unsafe. Because using it in multithreaded program causes undefined behavior for any c code that reads the environment (which includes quite a few libc and posix functions).

Change channels to have a better API that is mpmc and closer to crossbeam.

And probably others I can't think of at the moment.

Re:Changing the Rules of Rust by afdbcreid on Monday September 18, 2023 @11:14AM (#37557295)
I'm curious about the "change channels to be mpmc" one. Why isn't it backwards-compatible?

About `std::env::set_var()`, there was a proposal for a `#[deprecated_safe]` attribute that triggers a warning if the function is used without an unsafe block, and eventually make that a hard error in future edition.