I suspect that would break a ton of code - ES6 name inference already broke
some of mine, but I was able to work around it by using this kind of
indirection.

On Sun, Feb 3, 2019 at 11:02 AM Sultan <[email protected]> wrote:

> Where there any attempts to allow factory functions the ability to assume
> the name of the binding they are assigned to?
>
> Consider the following:
>
> function factory () { return function () {} }
> var foo = factory()
> console.assert(foo.name === 'foo')
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to