Skip to content
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

Normative: Remove implementation-defined typeof behavior #1441

Merged
merged 1 commit into from
Apr 10, 2019

Conversation

littledan
Copy link
Member

@littledan littledan commented Feb 7, 2019

Previously, the ECMAScript specification permitted non-callable
non-standard exotic objects to have implementation-defined typeof,
within certain limits. Although some ECMAScript implementations
may have taken advantage of this possibility historically, it's not
clear that anyone needs it anymore. Instead, other mechanisms can
be used by embedders to indicate aspects of objects.

Closes #1440

@ljharb ljharb added normative change Affects behavior required to correctly evaluate some ECMAScript source text needs consensus This needs committee consensus before it can be eligible to be merged. labels Feb 7, 2019
@ljharb
Copy link
Member

ljharb commented Feb 7, 2019

Pretty hard to test a lack of unknown implementation-defined behavior here, so I don't think this would need any tests :-)

@littledan
Copy link
Member Author

I'm wondering about the "needs consensus" label here. Do you think this needs to be presented at a TC39 meeting, or could we get consensus for it on GitHub?

@ljharb
Copy link
Member

ljharb commented Feb 7, 2019

Generally, every normative change requires committee approval; it certainly seems like something we could decide on GitHub, but I would be uncomfortable merging a non-bugfix normative change without that explicit consensus.

@allenwb
Copy link
Member

allenwb commented Feb 8, 2019

Instead, @@toStringTag and other
mechanisms can be used by embedders to indicate aspects of objects

Just wanted to remind that @@toStringTag, unlike typeof, is forgeable and was never intended to be used as a reliable type checking mechanism. We shouldn't encourage people to try to use it that way.

Otherwise, I like the change this issue is proposing.

annevk
annevk previously requested changes Feb 8, 2019
Copy link
Member

@annevk annevk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should also remove the note below the table as it's no longer applicable.

@littledan
Copy link
Member Author

Removed the reference to @@toStringTag as @allenwb suggested and the note that @annevk pointed out. Thanks for the quick reviews everyone!

To the editor group: Do you plan to put this on the agenda for the upcoming TC39 meeting, or should I do it?

@ljharb
Copy link
Member

ljharb commented Feb 9, 2019

It’s always preferred when committee members can drive their own needs-consensus changes.

@ljharb ljharb requested review from bterlson, zenparsing and a team February 9, 2019 17:46
@littledan
Copy link
Member Author

Alright, thanks for the clarification and quick review.

@jmdyck
Copy link
Collaborator

jmdyck commented Feb 10, 2019

It’s always preferred when committee members can drive their own needs-consensus changes.

So what should happen when a needs-consensus change doesn't 'belong' to a committee member?

@ljharb
Copy link
Member

ljharb commented Feb 10, 2019

@jmdyck in that case (or when no committee member is driving it) it's up to the editors to proactively add it to the agenda, as time permits.

@jmdyck
Copy link
Collaborator

jmdyck commented Feb 10, 2019

Cool, thanks.

@ljharb
Copy link
Member

ljharb commented Feb 25, 2019

The HTML change for this seems to have landed whatwg/webidl#640

@annevk
Copy link
Member

annevk commented Feb 25, 2019

To be clear, that text can be removed if this lands. It's mostly added there since this change is taking a while.

@ljharb ljharb removed the request for review from bterlson February 28, 2019 19:52
@ljharb ljharb self-assigned this Mar 15, 2019
@ljharb ljharb added has consensus This has committee consensus. and removed needs consensus This needs committee consensus before it can be eligible to be merged. labels Mar 26, 2019
@ljharb ljharb dismissed annevk’s stale review March 26, 2019 18:01

note has been removed

@ljharb ljharb requested a review from annevk March 26, 2019 18:02
Previously, the ECMAScript specification permitted non-callable
non-standard exotic objects to have implementation-defined typeof,
within certain limits. Although some ECMAScript implementations
may have taken advantage of this possibility historically, it's not
clear that anyone needs it anymore. Instead, other mechanisms can
be used by embedders to indicate aspects of objects.

Closes tc39#1440
@ljharb ljharb merged commit 143931e into tc39:master Apr 10, 2019
annevk added a commit to whatwg/webidl that referenced this pull request Apr 11, 2019
Ms2ger pushed a commit to whatwg/webidl that referenced this pull request Apr 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has consensus This has committee consensus. normative change Affects behavior required to correctly evaluate some ECMAScript source text
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants