I am surprised the blog post doesn't mention the stabilization of binding both by-move and by-ref in patterns [1]. I have personally been waiting on this one for several years. Time to go remove my workarounds. Thanks! [1]: https://github.com/rust-lang/rust/pull/76119
There is always an art to what to decide to put in vs not, and it wasn't 100% clear to us how important folks consider this feature. We waffled a bit, it was basically a coinflip on putting it in or not.
Rust 1.49.0
11–20 of 117 posts
Re: Rust 1.49.0
#12Re: Rust 1.49.0
#13For me it was specially nice to have some minutes shaved off from full builds.
Re: Rust 1.49.0
#14I wish they would streamline the string handling capabilities. Currently the conversions between String and &str are really ugly to look at. In general the conversion between types don't seem all that great with developers having to either use crates or write their own code. They need to take more inspiration from C# which continues to be the benchmark of elegance (obviously personal opinion). That said, rust is stil…
Re: Rust 1.49.0
#15I wish they would streamline the string handling capabilities. Currently the conversions between String and &str are really ugly to look at. In general the conversion between types don't seem all that great with developers having to either use crates or write their own code. They need to take more inspiration from C# which continues to be the benchmark of elegance (obviously personal opinion). That said, rust is stil…
This is entirely up to you; unless you find method calls ugly, in which case, you've got bigger problems :)
> They need to take more inspiration from C#
Could you elaborate a bit? I'm not familiar with what C# does here.
Re: Rust 1.49.0
#16Earlier quoted context omitted.
There is always an art to what to decide to put in vs not, and it wasn't 100% clear to us how important folks consider this feature. We waffled a bit, it was basically a coinflip on putting it in or not.
I generally started going from the blog posts to the changelog as I felt for a few times now that the stuff I care about was not in the announcement blog post.
This has the funny effect of posts getting harder to write as time goes on; we have less releases with big, important features, and more releases with "tons of bugfixes and some minor improvements."
Re: Rust 1.49.0
#17(Yes, I know that "unstable" in slice::select_nth_unstable refers to unstable sorting.)
Re: Rust 1.49.0
#18I wish they would streamline the string handling capabilities. Currently the conversions between String and &str are really ugly to look at. In general the conversion between types don't seem all that great with developers having to either use crates or write their own code. They need to take more inspiration from C# which continues to be the benchmark of elegance (obviously personal opinion). That said, rust is stil…
I'm not sure what you mean by conversion between String and &str? To get an owned String from a &str you just use the `into` method, no?
* Into, with s.into()
* An inherent method, .as_str()
* Deref coercion, &s
* Reborrowing, &*s (this builds on Deref too but isn't a coercion and can be done in places where coercion doesn't kick in)
... and probably some others I'm forgetting.
Re: Rust 1.49.0
#19 match result {
Ok(value) => value,
Err(result) => {
panic!("error traversing directories {}", result);
}
};
It's awkward and ugly. I'm back to C#, now on .NET 5.) and find that it just got noticeably faster! It was already fast."Astonishing Performance of .NET 5: More Data"
https://medium.com/swlh/astonishing-performance-of-net-5-mor...
Re: Rust 1.49.0
#20I wish they would streamline the string handling capabilities. Currently the conversions between String and &str are really ugly to look at. In general the conversion between types don't seem all that great with developers having to either use crates or write their own code. They need to take more inspiration from C# which continues to be the benchmark of elegance (obviously personal opinion). That said, rust is stil…
> the conversions between String and &str are really ugly to look at. This is entirely up to you; unless you find method calls ugly, in which case, you've got bigger problems :) > They need to take more inspiration from C# Could you elaborate a bit? I'm not familiar with what C# does here.
I'm still figuring my way around rust so obviously some noob questions follow: -> what's with the move/copy mess ? I know why they are needed but it seem to be in the face with all the explicit '&' all over the place in any reasonably sized code. Why not hide it a bit by letting the implicit copy to happen to simpler structures ? (at compile time).
-> Why no love for inheritance? :) - it makes certain patterns easier to implement
-> Why no love for global/static variables ? I know they are prone to be misused but some patterns like singleton really need a lot of shortcuts to implement. And there will always be some cases where you want to keep variables with static and global scope