I’m really excited about releases like these. It’s just “finishing” the language and not adding any new features conceptually, just making it all more cohesive. The lack of Enum default derive is one of those things I run into rarely, but adding it in now reduces the conceptual overhead of Rust since deriving default now works on both Enums and Structs.
I also think this shows the benefit of Rust’s release model, which is that smaller fixes and stabilizations can be made over time, and don’t have to be part of a larger release. I’m curious how the potential Rust stabilization in GCC affects things, especially when smaller fixes in a release like this might be nice in older versions of Rust (and as far as I know GCC is targeting an older Rust version).
Rust has a fixed 6-week release train model. Nobody decides which release is going to be small or not. When stuff is ready, it lands.
Once in a while a large feature that took years to develop lands, and people freak out and proclaim that Rust is changing to fast and rushing things, as if it invented and implemented every feature in 6 weeks.
In this release: cargo add feature request was filed 8 years ago. Implementation issue has been opened 4 years ago. It waited for a better TOML parser/serializer to be developed, and once that happened, the replacement work started 5 months ago.
Yeah the gcc-rs project. I wonder about certain stabilizations in later versions of Rust which are very easily added to earlier versions of Rust built by gcc-rs. I don’t think it will affect mainline Rust, but if certain nice-to-haves, or more importantly unsound fixes, are backported for gcc-rs that could cause an unfortunate schism in the ecosystem.
I haven’t seen or heard of anything indicating this might happen, but with multiple implementations in-use I do think it is something that will eventually occur (especially for safety-related and unsound concerns)
I have never liked the idea of a Default trait or typeclass. Default with respect to what operation? Most times people want defaulting, they seem to have some kind of monoidal operation in mind.
Initialization right? I don’t see how one would use the trait for any other operation. To me it seems quite natural that a number has a “reasonable default” (0) as well as a string (""). It’s not like the language forces you to use Default in case you have other defaults in mind.
This really should just be the job of auto-completion in Cargo.toml. For IntelliJ, I believe it has been working for years. For rust-analyzer, we didn’t get to supporting Cargo.toml properly.
The mutex overhaul issue is very in-detail about various implementations and problems. For example the rabbit hole of priority inheritance with mutex contention.
This lead me to the docs for
std::f32::total_cmp()
, which has the following brilliant example code:I’m really excited about releases like these. It’s just “finishing” the language and not adding any new features conceptually, just making it all more cohesive. The lack of Enum default derive is one of those things I run into rarely, but adding it in now reduces the conceptual overhead of Rust since deriving default now works on both Enums and Structs.
I also think this shows the benefit of Rust’s release model, which is that smaller fixes and stabilizations can be made over time, and don’t have to be part of a larger release. I’m curious how the potential Rust stabilization in GCC affects things, especially when smaller fixes in a release like this might be nice in older versions of Rust (and as far as I know GCC is targeting an older Rust version).
Rust has a fixed 6-week release train model. Nobody decides which release is going to be small or not. When stuff is ready, it lands.
Once in a while a large feature that took years to develop lands, and people freak out and proclaim that Rust is changing to fast and rushing things, as if it invented and implemented every feature in 6 weeks.
In this release:
cargo add
feature request was filed 8 years ago. Implementation issue has been opened 4 years ago. It waited for a better TOML parser/serializer to be developed, and once that happened, the replacement work started 5 months ago.This piques my interest. What library is this? Does it maintain comments/formatting?
The crate is toml_edit, and it does preserve comments and (most) formatting.
Maybe something to format Cargo.toml files could be helpful as well?
What do you mean? The gcc-rs project? I’d hope it doesn’t affect mainline Rust at all.
Yeah the gcc-rs project. I wonder about certain stabilizations in later versions of Rust which are very easily added to earlier versions of Rust built by gcc-rs. I don’t think it will affect mainline Rust, but if certain nice-to-haves, or more importantly unsound fixes, are backported for gcc-rs that could cause an unfortunate schism in the ecosystem.
I haven’t seen or heard of anything indicating this might happen, but with multiple implementations in-use I do think it is something that will eventually occur (especially for safety-related and unsound concerns)
I have never liked the idea of a
Default
trait or typeclass. Default with respect to what operation? Most times people want defaulting, they seem to have some kind of monoidal operation in mind.Initialization right? I don’t see how one would use the trait for any other operation. To me it seems quite natural that a number has a “reasonable default” (
0
) as well as a string (""
). It’s not like the language forces you to useDefault
in case you have other defaults in mind.Excited to use this! For context, you previously had to use another crate (
cargo-edit
) that implemented this featureThis really should just be the job of auto-completion in Cargo.toml. For IntelliJ, I believe it has been working for years. For rust-analyzer, we didn’t get to supporting Cargo.toml properly.
And if you want an ergonomic feature enablement or the ability to remove dependencies, you still need
cargo-edit
.The mutex overhaul issue is very in-detail about various implementations and problems. For example the rabbit hole of priority inheritance with mutex contention.
https://github.com/rust-lang/rust/issues/93740