4 ms·
What I find most interesting about the whole 'try' discussion: There is one thing that makes the try-function special: It can trigger a return for the calling f
by arendtio 7y ago
What I find most interesting about the whole 'try' discussion: There is one thing that makes the try-function special: It can trigger a return for the calling function.
But instead of finding a general way how we can write functions that can do this, we want to add a function that looks like all the other functions but doesn't work like them.
So even if I like what we are trying to achieve here, it feels wrong to me.
- cesarb 7y ago> we want to add a function that looks like all the other functions but doesn't work like them. I like how Rust does it: all macros and special built-ins like these have names ending with an exclamation point. So when you see for instance "try!(something())", you know that this "try!()" is not a normal function call.