It's interesting to see people complain about potential implicit end of function ergonomics features in @rustlang, ignoring that a lot of the modern language practice is based on similar things, e.g.:
* Deref
* ? with implicit From conversion
* Reborrow
* match ergonomics
Ommitting the ? operator wouldnt work well with failure's `.context()` method, or `.unwrap()`. Maybe `.foo^?` might be more clear? Separate the casting from how the error handling.
-
-
The context is always "tried to convert x to y". We could totally automate this in debug mode
-
I always think of the context method to provide a typed history of sorts for errors you encounter. Helps clarify the origin of the error It's close, but think it's slightly different from what you meant. https://paper.dropbox.com/doc/How-To-Failure-Vb2j93CuQKwLR57xX5dUF … has some more on it.
- 4 more replies
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.