Hacker News Comments on
Scott Wlaschin - Railway Oriented Programming -- error handling in functional languages
NDC Conferences
·
Vimeo
·
3
HN comments
HN Theater has aggregated all Hacker News stories and comments that mention NDC Conferences's video "Scott Wlaschin - Railway Oriented Programming -- error handling in functional languages".
Vimeo Summary
HN Theater Rankings
- This course is unranked · view top recommended courses
Hacker News Stories and Comments
All the comments and stories posted to Hacker News that reference this video.
⬐
Jul 09, 2016
·
jbritton on
Introducing Verve: minimalistic, static, functional language
I have had an idea concerning error handling, but I don't really know if it makes sense. There has been a push in the functionality community to do error handling with Maybe or Either monads or perhaps something similar to them. However, this creates the situation where many functions return these monads(two track values), but most functions accept as input simple values(one track values). So there is a constant need to lift functions. I just know a little bit of Haskell so maybe the burden of constantly lifting is not so awful, but it currently seems that way to me. I was thinking that a language that could detect this and then automatically lift the functions might be cool. However, the normal case is simply to push failures through the system, by skipping all functions after the failure, and this is not always the behavior needed. Perhaps it is ok to continue if only one of a set of functions succeeds, or perhaps one wants to retry some number of times or for some duration of time before giving up. It would seem possible to use monads to handle all desired cases, but not with auto-lifting. In any case, I really think that a better system for handling errors would be that killer feature that would make a language worth while. This is something that would pervade the languages library and thus make sense to have a new language. This video partially inspired the idea. Scott Wlaschin - Railway Oriented Programming — error handling in functional languages. https://vimeo.com/97344498 The other one is the language Icon where every expression has a success/failure property with automatic backtracking.
⬐ johncolanduoniWhat you're describing as far as lifting is not unlike algebraic effects, like Eff[1] and Idris[2] have. Basically, you can have some sort of "exception" effect, except limited to particular type of error, and this system will mix them without having to use monad transformers. This particular application is not too dissimilar to checked exceptions, but the algebraic effect approach gives you a lot more power. It also makes it easy to deal with pure vs. impure functions, IO, etc. seamlessly.Responding to internal errors differently based on the caller's desire is possible with Lisp; there's a good overview here[3]. It looks like algebraic effects can do something similar, as described in this paper[4] (search for lisp and the relevant portion should show up).
[1]: http://math.andrej.com/eff/
[2]: http://www.idris-lang.org/
[3]: http://www.gigamonkeys.com/book/beyond-exception-handling-co...
[4]: https://hal.archives-ouvertes.fr/hal-01079206/file/effects-p...
⬐ dom96Another language worth looking into if you're interested in effect systems is Nim. It includes an effect system that deals with both exceptions and other effects (like for example IO read/write effects): http://nim-lang.org/docs/manual.html#effect-system-exception.... The exception tracking is similar to a checked exception system but is far less annoying than Java's. In my opinion it is the best way to ensure exceptions are handled.
⬐
Mar 30, 2015
·
agumonkey on
Monoids without tears (2014)
I found Wlaschin work well balanced between accessible and complex.https://vimeo.com/97344498Vimeo https://speakerdeck.com/swlaschin http://www.slideshare.net/ScottWlaschin
And wip book https://leanpub.com/understandingfunctionalprogramming
⬐
Jun 13, 2014
·
pi-rat on
Railway-oriented programming
He presented the same talk at NDCOslo, available here (without registration): https://vimeo.com/97344498Was a pretty good talk :)