2 ms·
`throw` in Java's exception handling also prematurely exits a function. So? While `try!()` is a macro and not a core language feature, most of the macros in th
by Manishearth 12y ago
`throw` in Java's exception handling also prematurely exits a function. So?
While `try!()` is a macro and not a core language feature, most of the macros in the standard library can be treated as such. So a Rust programmer will know that `try!()` can return, just like a Java programmer knows that `throw` returns early.
Besides, macros are syntactically distinguishable in Rust. When you see that exclamation mark, you have to rememeber that it's a macro and might be doing arbitrary compile time things along with arbitrary token tree expansion.