Suggestion: Destructuring object initializer.

Raul-Sebastian Mihăilă raul.mihaila at gmail.com
Wed Feb 14 05:46:29 UTC 2018


Bob, it's not clear that you understood what Alexander said about the
lookup. Object.assign contains 2 names. 'Object' needs to be looked up in
all the execution contexts chain, starting with the current execution
context, until the global Object function is found. Then the 'assign'
property must be found on that object (it might have been deleted since it
is configurable). The syntactic form doesn't require these lookups.

Regarding `Object.assign({}, a, b)`, the empty object can inherit a setter
which would be called.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20180214/88d85ccb/attachment.html>


More information about the es-discuss mailing list