Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

He somewhat obscures that point with tangentially-relevant grumbling and dead-horse-beating, if indeed that's the point he was trying to make (I guess I can see it, looking at the submission again with that interpretation in mind) -- you've made it more clearly in a paragraph than he did in a whole blog post.

[edit]

Also, Haskell does have type-safe exceptions -- using MonadError (http://hackage.haskell.org/packages/archive/mtl/latest/doc/h...).

Actually, as far as I'm aware, IO exceptions don't see much use in practice -- they aren't considered very "Haskell-y". In fact, that's partly because of the dynamic typing aspect that this whole discussion centres around; but also because their behaviour is dependent on evaluation order, and because the possibility of an expression throwing one isn't encoded in that expression's type. None of that is really in the spirit of idiomatic Haskell.

As such, MonadError is the way exception-like behaviour tends to be handled, AFAIK.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: