New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symbols on Module Namespace Exotic Objects #693

Closed
GeorgNeis opened this Issue Sep 15, 2016 · 4 comments

Comments

Projects
None yet
4 participants
@GeorgNeis
Contributor

GeorgNeis commented Sep 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).

@ajklein

This comment has been minimized.

Show comment
Hide comment
@ajklein

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.

Contributor

ajklein commented Sep 28, 2016

@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

This comment has been minimized.

Show comment
Hide comment
@bterlson

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.

Member

bterlson commented Oct 12, 2016

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.

@domenic

This comment has been minimized.

Show comment
Hide comment
@domenic

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".

Member

domenic commented Oct 12, 2016

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".

@ajklein

This comment has been minimized.

Show comment
Hide comment
@ajklein

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.

Contributor

ajklein commented Oct 12, 2016

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.

ajklein added a commit to ajklein/ecma262 that referenced this issue Dec 6, 2016

Remove @@iterator from Module Namespace objects
Per consensus at the November 2016 meeting, Module Namespace exotic
objects no longer have an @@iterator method.

Also changes the [[Configurable]] property of the @@toStringTag
property to false, as per consensus in the same meeting (and
because it's impossible to reconfigure due to the exotic
methods of such objects).

This closes tc39#693 and tc39#710.

bterlson added a commit that referenced this issue Dec 20, 2016

Normative: Remove @@iterator from Module Namespace objects (#747)
Per consensus at the November 2016 meeting, Module Namespace exotic
objects no longer have an @@iterator method.

Also changes the [[Configurable]] property of the @@toStringTag
property to false, as per consensus in the same meeting (and
because it's impossible to reconfigure due to the exotic
methods of such objects).

This closes #693 and #710.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment