A Result class for functions that may return errors

Isiah Meadows isiahmeadows at gmail.com
Tue Oct 18 20:28:17 UTC 2016

I would also like to point out that V8 is one of few that don't optimize
`try-catch`, and both Chakra and SpiderMonkey do optimize them IIRC (the
latter has trouble optimizing functions that throw, though).

On Tue, Oct 18, 2016, 15:29 Josh Tumath <josh.tumath at outlook.com> wrote:

> > 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.
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20161018/67dc7047/attachment.html>

More information about the es-discuss mailing list