Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upSymbols on Module Namespace Exotic Objects #693
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ajklein
Sep 28, 2016
Contributor
@bterlson Would love your input, it's hard to tell if this is a simple spec bug or if there's some deep intention in this inconsistency.
|
@bterlson Would love your input, it's hard to tell if this is a simple spec bug or if there's some deep intention in this inconsistency. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
bterlson
Oct 12, 2016
Member
Seems like an oversight to me. I could see the current design making sense if the symbols were non-configurable, but instead they are configurable but impossible to change given the implementations of [[Delete]], [[Set]], and [[DefineProperty]]. These should learn to delegate symbol keys to the ordinary variants.
|
Seems like an oversight to me. I could see the current design making sense if the symbols were non-configurable, but instead they are configurable but impossible to change given the implementations of [[Delete]], [[Set]], and [[DefineProperty]]. These should learn to delegate symbol keys to the ordinary variants. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
domenic
Oct 12, 2016
Member
I don't really have an opinion either way, but it seems like a plausible path is to just make the symbols non-configurable? It's a little strange that there would be two configurable properties on an object that otherwise acts somewhat "frozen".
|
I don't really have an opinion either way, but it seems like a plausible path is to just make the symbols non-configurable? It's a little strange that there would be two configurable properties on an object that otherwise acts somewhat "frozen". |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
ajklein
Oct 12, 2016
Contributor
I was thinking that non-configurable would make more sense, too. Though if we do that I think we'd have to freeze the @@iterator method as well.
|
I was thinking that non-configurable would make more sense, too. Though if we do that I think we'd have to freeze the @@iterator method as well. |
GeorgNeis commentedSep 15, 2016
Module Namespace Exotic Objects have two (own) symbol properties.
[[Get]], [[GetOwnProperty]], and [[HasProperty]] for these have the ordinary semantics, but [[Delete]], [[Set]] and [[DefineProperty]] don't (e.g. [[DefineProperty]] always fails). This seems inconsistent and I'm wondering if it is a bug. (Also note that these symbols are set up as configurable).