Announcing Rust 1.27.2
blog.rust-lang.org
Announcing Rust 1.27.2
1–10 of 34 posts
Re: Announcing Rust 1.27.2
#2Re: Announcing Rust 1.27.2
#3Does anyone else here share a concern over numerous patches to the match ergonomics feature?
Re: Announcing Rust 1.27.2
#4Does anyone else here share a concern over numerous patches to the match ergonomics feature?
So if your question is literally, “Does anybody else...” then the answer is yes:
“Users have expressed concern with the frequency of patch releases to fix bugs in the match ergonomics verification by the current borrow checker on a variety of Rust’s forums. ”
If the question is more about being concerned yourself, do the reasons listed in the link address your concerns?
Re: Announcing Rust 1.27.2
#5=======================
fn transmute_lifetime(t: &'a (T,)) -> &'b T {
match (&t, ()) {
((t,), ()) => t,
}
}=======================
I thought Obfuscated-C was hard to read. Then C++ with all its templates. Now, I'm thinking Rust has taken the prize.
Re: Announcing Rust 1.27.2
#6Sample Code: ======================= fn transmute_lifetime (t: &'a (T,)) -> &'b T { match (&t, ()) { ((t,), ()) => t, } } ======================= I thought Obfuscated-C was hard to read. Then C++ with all its templates. Now, I'm thinking Rust has taken the prize.
Re: Announcing Rust 1.27.2
#7Does anyone else here share a concern over numerous patches to the match ergonomics feature?
[1] https://blog.rust-lang.org/2018/06/05/Rust-1.26.2.html (June 5)
[2] https://blog.rust-lang.org/2018/07/10/Rust-1.27.1.html (June 10)
[3] https://blog.rust-lang.org/2018/07/20/Rust-1.27.2.html (July 20)
The latest of these actually address your concern directly.Re: Announcing Rust 1.27.2
#8Does anyone else here share a concern over numerous patches to the match ergonomics feature?
There’s a whole section on the page with the header “Concern over numerous patches to the match ergonomics feature”. So if your question is literally, “Does anybody else...” then the answer is yes: “Users have expressed concern with the frequency of patch releases to fix bugs in the match ergonomics verification by the current borrow checker on a variety of Rust’s forums. ” If the question is more about being concern…
Re: Announcing Rust 1.27.2
#9Sample Code: ======================= fn transmute_lifetime (t: &'a (T,)) -> &'b T { match (&t, ()) { ((t,), ()) => t, } } ======================= I thought Obfuscated-C was hard to read. Then C++ with all its templates. Now, I'm thinking Rust has taken the prize.
A function 'transmute_lifetime' that takes a tuple of generic type T with lifetime 'a and returns a T with lifetime 'b...
And then the code itself, beyond the function signature, is trivial destructuring matching.
If you're not familiar with the syntax of a language, of course it won't be easy to read.
perl and bash can rapidly devolve into symbol salad if you don't know them. If you don't know es6, javascript's spread and destructuring assignment syntax can look every bit as strange.
That all being said, the point of this rust code was to be a minimal example. Minimal reproducers are often nonsensical and unidiomatic, which helps put this in further context.
I think the original un-minimized crashing code was this: https://github.com/rust-lang/rust/issues/52213#issuecomment-...
That's clearly more readable, and that's what more typical rust looks like.