News for hackers. Stuff that matters.
Re:Why Go Gets Exceptions Right by Lambdanaut on Friday September 14, 2012 @09:48AM (#4521588)
I like them. The only annoyance is that you're forced to wrap your return value in a monad even if the function succeeds. That's type safety for you!
Re:Why Go Gets Exceptions Right by eru on Friday September 14, 2012 @11:08AM (#4521992)
Yes. But that's because the default is non-monadic wrapped and an assumption that it can't go wrong. I'd had to see non-monadic wrapped values to silentry go wrong or raise an exception. (You can do something like Go's panic in pure values. But you are not supposed to do that for recoverable conditions.)
Re:Why Go Gets Exceptions Right by Evbn on Friday September 14, 2012 @09:23PM (#4524854)
In practice, wrapping a return value in a monad looks exactly like returning a regular value in another language: return x.