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!
-
-
Show 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!
Show this thread
End of conversation
New conversation -
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.