If a function outlives its creation scope then this would do exactly what a normal return would do. On 28 August 2017 at 21:29, Sebastian Malton <[email protected]> wrote:
What if that context is no longer live? A function can outlive its creation scope. You could even try returning twice from the same function. Allowing returns from outer functions has been discussed extensively in the ES6 phase (e.g. under the term "blocks"), but has been decided against in favour of arrow functions. One problem is that it introduces quite complex dynamic behaviour in general (it's halfway to introducing delimited continuations), and many new ways to fail.
That's unlikely, since it is just as dynamic in the general case (and the less general cases can be optimised equally well for both). | ||
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

