4 ms·
As a recent convert to functional programming, I'd like to point out that more functional styles of error handling helps one address them more properly and not
by ionforce 11y ago
As a recent convert to functional programming, I'd like to point out that more functional styles of error handling helps one address them more properly and not sweep them under the rug.
This ties into the article's first point about how poor error handling is a common source of bugs.
- dkarapetyan 11y agoHow exactly does functional programming help here?
- anonymousDan 11y agoI guess he's referring to things like the maybe monad.
- acconsta 11y agoSum types allow a function to return either a result or an error. Not accounting for both possibilities is a compile time type error. Go mimics this behavior, so it's not only a functional thing: http://blog.golang.org/error-handling-and-go http://blog.golang.org/error-handling-and-go