This doesn't address the symbol idea, but I don't see the motivation for
that. A well-known symbol doesn't help usability or integrity. Matthew,
could you please link to the twitter thread?
Anyway, the reason 'name' is a normal property identifier and not a
symbol is because it's a de-facto standard of sorts, with some
intersection semantics.
/be
Allen Wirfs-Brock wrote:
On Feb 25, 2015, at 7:26 PM, Matthew Robb <[email protected]
<mailto:[email protected]>> wrote:
...
I think it would be best to put more distance between the name
property of a function and it's binding (if any) to reduce any
potential confusion. Making it a symbol property and (also my
opinion) making it writable would help in reducing said confusion.
The automatically provided ‘name’ property of function objects has the
attributes writable: false, configurable true. That means that its
value can be modified using Object.defineProperty or deleted using the
delete operator. You just can’t modify it using the assignment (=)
operator.
Allen
_______________________________________________
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