2 ms·
dbaupp's gotten here first, but let me add my own. :) > Then there's the "try!" macro, which generates an > invisible return on error. You can't criticiz
by kibwen 11y ago
dbaupp's gotten here first, but let me add my own. :)
> Then there's the "try!" macro, which generates an
> invisible return on error.
You can't criticize `try!` for this in one breath and then go on to suggest exceptions in the next, considering that exceptions insert invisible returns into your entire call stack. And an exception in C++ can be thrown on nearly any operation imaginable (even assignment!); meanwhile, `try!` is explicit, and a function that uses it won't even compile unless its signature explicitly returns a Result.