Instead of writing, def fn() = { val result = someExpression doSomethingElse() result } I've found myself writing code like, def fn() = try someExpression finally doSomethingElse() more, even when `someExpression` is pure. I'm not entirely sure how I feel about it.
-
-
I guess the question is central if doSomethingElse() is dependent on the assumption that the original expression is pure and always successful or is an actual finalizer of sorts?
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.