Does Scala even need the `try` keyword, and must `catch` be a keyword? I'd be happy to call `.catch(partialFunction)` directly on an expression or code block. It could be implemented as an extension method.
That would work exactly the same as try { throw new Exception() } catch { ... }
-
-
(except that in Scala 2 it would require an additional allocation, and you would get an additional stack frame...)
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
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.