A Result class for functions that may return errors
josh.tumath at outlook.com
Tue Oct 18 19:29:14 UTC 2016
> Not sure if I'm missing something, but wouldn't it be trivial to code that constructor in JS?
Yes it would be trivial, but my design I came up with was an example. The point I wanted to get across was to have some sort of standard practice for error handling using `return` rather than `throw`, akin to how `Promise` gives us a standard design and encapsulation for asynchronous code.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss