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

clarify equality #43

Merged
merged 3 commits into from
Aug 28, 2019
Merged

clarify equality #43

merged 3 commits into from
Aug 28, 2019

Conversation

mheiber
Copy link
Contributor

@mheiber mheiber commented Aug 17, 2019

  • Clarify what we what we currently know about how the four equality algorithms of JS interact with Record and Tuple.

  • Note that we have not yet decided on how insertion order interacts with equality.

  • Update wording to make it clear that there are no boxed Records or Tuples.

close #20

Max Heiber added 2 commits August 17, 2019 20:58
Clarify that the `Record` and `Tuple` namespaces
are not constructors and don't have instances.
@mheiber mheiber force-pushed the equality-clarification branch from a560de5 to 1cf5965 Compare August 17, 2019 20:20
@ljharb
Copy link
Member

ljharb commented Aug 17, 2019

The boxed form, like every object, must only ever be equal to itself.

@mheiber
Copy link
Contributor Author

mheiber commented Aug 17, 2019

I'm starting to like Object(#{ a: 1 }) // {}.
When all options are bad, we must pick the least bad option.

@ljharb
Copy link
Member

ljharb commented Aug 17, 2019

It’d still have to be special, not a normal object - there’d have to be a way to toPrimitive it and extract the underlying Record (another axiom is that all types have at least one unforgeable brand-checking method)

Don't decide whether there are
boxed versions of records and tuples.

Put it in the FAQ as an open question
for now.
@mheiber
Copy link
Contributor Author

mheiber commented Aug 28, 2019

Updated the PR to not express an opinion on boxing. Moved the boxing question to FAQ. Thanks @ljharb

@rickbutton rickbutton merged commit b0e03ef into tc39:master Aug 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Object.is semantics?
3 participants