News for hackers. Stuff that matters.
Re:Railway oriented programming by gpderetta on Thursday June 23, 2016 @05:26AM (#11959748)
4) Good luck getting a stack trace.

That's a great point. At the end of the day, Either and (checked) exceptions are equivalent from a semantic point of view, but having exceptions being an explicit part of the language means much better support for tooling and debugging.

Re:Railway oriented programming by pacala on Thursday June 23, 2016 @09:42AM (#11960749)
Nothing prevents the system to add a stack trace on the Error branch of an Either. It's just that some evaluation strategies [lazy] that are usually associated with functionally programming [Haskell] provide unusual reduction traces. An eagerly evaluated expression would add the usual stack traces.
Re:Railway oriented programming by gpderetta on Thursday June 23, 2016 @11:48AM (#11961908)
It is not just stack traces. If an exception is not handled, the debugger will break at the frame that trowing the exception (at leat on sane implementations that do two phase unwind), while with either (and error codes) all state useful for debugging will have been destroyed.