4 ms·
This is a great example of the issue with using monads and monad-like patterns in languages that don't have proper support via language constructs for these. I
by PartiallyTyped 3y ago
This is a great example of the issue with using monads and monad-like patterns in languages that don't have proper support via language constructs for these.
In rust for example, this is trivially handled with the questionmark postfix operator — which is just sugar for match — whereas in languages like JS and Java, stacking Optionals and so on can be rather painful as all this sugar is done manually.