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

We basically ban throwing exceptions in pure code at my shop; usually we use ExceptT or throwIO or something.

I used to think the multiplicity of error handling constructs in Haskell was confused and bad, but they all have their uses. The key insight is that your error handling should conform to the local structure of your code, not the other way around.

Propagating errors across multiple component boundaries or multiple layers can be cumbersome but I think that reveals fundamental architectural weaknesses in the program itself.



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

Search: