Was reading about Rust's new generalized type ascription proposal (which looks like it might be merged soon!) and it's suuuper exciting! https://github.com/Centril/rfcs/blob/rfc/generalized-type-ascription/text/0000-generalized-type-ascription.md …
-
Show this thread
-
Basically what this seems to allow us to do is allow for better type inference by allowing to annotate exactly where it's needed, and nowhere else. Also, if I'm reading this right, it would remove the need for Turbo Fish pretty much everywhere!
1 reply 0 retweets 1 likeShow this thread -
For example, take this statement (yay, turbo fish!): match foo.parse::<i32>() { Ok(x) => ..., Err(e) => ... } With type ascription it could be rewritten to: match foo.parse() { Ok(x: i32) => ..., Err(e) => ..., } Which seems much clearer!
2 replies 0 retweets 5 likesShow this thread -
Replying to @yoshuawuyts
Now we can fight in PRs whether to use the turbo fish or type ascription. I still think it turbo fish looks cooler. And the name is also way superior

3 replies 0 retweets 0 likes -
-
Replying to @yoshuawuyts @hoodie_de
I think that's explicitly not clippys policy?
1 reply 0 retweets 1 like -
Replying to @Argorak @hoodie_de
Oh, didn't know that. Maybe it could be a future opt-in lint or something? Hmmm, okay yeah perhaps this is less straight forward than I thought. Do feel there'd be a lot of benefit to an automated solution here. I'm also not looking forward to bike shed discussions
1 reply 0 retweets 0 likes -
Replying to @yoshuawuyts @hoodie_de
We frequently have people trying to sidetrack language discussions by later trying to lint things away. I don't see much benefit in style linters, IMHO, they just put the bikeshedding on another level and entrench it.
1 reply 0 retweets 1 like -
1 reply 0 retweets 0 likes
Ugh, yeah saw that and agree that's not good.
But do feel it'd be helpful for me if there was a lint to help point out when reusing an inline `impl` a bunch, and a `where` clause might be clearer. Or vice versa.
Just hints on how to better help navigate language features 
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
