4 ms·
I've found I really like error handling with monads, in languages like Scala. You can have the same boilerplate where you match an Option type on if it is a Som
by djsumdog 7y ago
I've found I really like error handling with monads, in languages like Scala. You can have the same boilerplate where you match an Option type on if it is a Some/None or Try type with Success/Error, but you can also chain them together in flatmaps and have one location to return an error.
Such things probably wouldn't work in systems languages like Go. I'm surprised we haven't seen more push for functional system/embedded languages.
- andrewjf 7y agoI mean, Rust has exactly those things (Option, Result types), they are iterable, and is a systems language.