> a big concern for me is what to do about functions being passed around
Nothing happens to them. This feature is only about assignments where the right
hand side consists of a function expression.
> var a = {};
> a.foo = function () {}
> // .name would be "foo"
Yes.
> var b = {};
> b.bar = a.foo;
> // .name would be "bar"
No, the name would still be "foo". It doesn't change when the function already
has a `.name`, and `a.foo` is not an anonymous function definition but a
memberexpression.
> doThing(()=>{})
> // what is .name?
Nothing. There is no identifier hanging around the function expression. It's
anonymous, and will stay so.
You see, no magic! :-)
Bergi
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss