4 ms·
>Since the language is GC'd and doesn't have language support to make a result type practical, it seems like exceptions are a no brainer. Elaborate? What preve
by kajaktum 4y ago
>Since the language is GC'd and doesn't have language support to make a result type practical, it seems like exceptions are a no brainer.
Elaborate? What prevents Go from introducing result monad aside from the syntax?
- nvarsj 4y agoI'm sure it could introduce something _like_ a result monad, but with the associated very clunky/verbose syntax in golang which reduces to conditionals and lots of type casts. I guess this is sort of where error is going. Something like Rust's '?' operator comes to mind. Also, pattern matching with parameter extraction.