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

Use Type(V) is object instead of if |V| is any kind of object #222

Closed
tobie opened this issue Nov 3, 2016 · 6 comments
Closed

Use Type(V) is object instead of if |V| is any kind of object #222

tobie opened this issue Nov 3, 2016 · 6 comments

Comments

@tobie
Copy link
Collaborator

tobie commented Nov 3, 2016

See #220 (comment)

@tobie
Copy link
Collaborator Author

tobie commented Jan 20, 2017

Do we also want to change things like this:

If |V| is <emu-val>null</emu-val> or <emu-val>undefined</emu-val>, then…

to

If [=Type=](|V|) is Null or Undefined, then…

@tobie
Copy link
Collaborator Author

tobie commented Jan 20, 2017

What about:

If |V| is a native <emu-val>Error</emu-val> object
(that is, it has an \[[ErrorData]] [=internal slot=]), then:

to:

If Type(|V|) is Object and |V| has an \[[ErrorData]] [=internal slot=])
(it's a native <emu-val>Error</emu-val> object), then:

@domenic
Copy link
Member

domenic commented Jan 20, 2017

Do we also want to change things like this:

These are equivalent. The ES spec seems to use both. From some brief skimming, it compares against the literal values most of the time, and does Type comparisons when it's part of a series of type comparisons (e.g. compare step 1 and step 8.a in https://tc39.github.io/ecma262/#sec-ordinarysetprototypeof).

I'd say not worth messing with unless you see something obviously weird as you go by.

What about:

This seems like a good change for slight clarity improvements. I might omit the parenthetical. Unlike the original change that spurred this issue though, it doesn't move us from using an unspecified concept to a specified one, so it's not as important.

@annevk
Copy link
Member

annevk commented Jan 20, 2017

Isn't "native Error object" kinda unspecified? That's not a phrase ECMAScript would use I think.

@domenic
Copy link
Member

domenic commented Jan 20, 2017

Yes, but the parenthetical specifies what is meant precisely.

tobie added a commit to tobie/webidl that referenced this issue Jan 20, 2017
tobie added a commit to tobie/webidl that referenced this issue Jan 20, 2017
@tobie
Copy link
Collaborator Author

tobie commented Jan 20, 2017

Closed by 898b8d2 (#270).

@tobie tobie closed this as completed Jan 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants