You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From the perspective of this specification, the word “is” is used to compare two values for equality, as in “If bool is true, then ...”, [...]. The specification identity of values determines the result of these comparisons and is axiomatic in this specification.
But paragraph 5 tells us that Booleans are "without specification identity". So how can specification identity determine the result of a comparison of two Booleans?
Also, paragraph 3 says:
From the perspective of the ECMAScript language, language values are compared for equality using the SameValue abstract operation and the abstract operations it transitively calls. The algorithms of these comparison abstract operations determine language identity of ECMAScript language values.
The latter sentence seems wrong to me. First, the phrase "language identity of ECMAScript language values" is odd, given that paragraph 5 tells us that many ECMAScript language values are without language identity.
So perhaps what the sentence in question means is something more like "[these algorithms] determine whether or not specific ECMAScript language values have language identity". But that isn't true either. E.g., if you look at the Note in SameValueNonNumber, it implies that Null/Undefined/BigInt/String/Boolean aren't "compared by identity", but that's far short of determining that they don't have language identity. Worse, that Note indicates that all Symbols can be compared by identity, implying that that they all have identity, which is true of specification identity but not language identity. (But maybe this is a bug in SameValue.)
Probably the sentence's use of "determine" is the problem. Maybe it should be more like "[these algorithms] rely on the concept of language identity [defined in paragraph 5]."
The text was updated successfully, but these errors were encountered:
For the first part, we think this can be clarified by replacing the second sentence with
For values with identity, the specification identity of those values determines the result of these comparisons. It is is axiomatic in this specification whether values have identity.
though it may read better to move those around somewhat.
Our editor call conversation got cut short, but the solution we were working on for the second part is adding "together with the GlobalSymbolRegistry".
The algorithms of these comparison abstract operations together with the GlobalSymbolRegistry determine language identity of ECMAScript language values.
In 5.2.7 Identity, paragraph 2 says:
But paragraph 5 tells us that Booleans are "without specification identity". So how can specification identity determine the result of a comparison of two Booleans?
Also, paragraph 3 says:
The latter sentence seems wrong to me. First, the phrase "language identity of ECMAScript language values" is odd, given that paragraph 5 tells us that many ECMAScript language values are without language identity.
So perhaps what the sentence in question means is something more like "[these algorithms] determine whether or not specific ECMAScript language values have language identity". But that isn't true either. E.g., if you look at the Note in SameValueNonNumber, it implies that Null/Undefined/BigInt/String/Boolean aren't "compared by identity", but that's far short of determining that they don't have language identity. Worse, that Note indicates that all Symbols can be compared by identity, implying that that they all have identity, which is true of specification identity but not language identity. (But maybe this is a bug in SameValue.)
Probably the sentence's use of "determine" is the problem. Maybe it should be more like "[these algorithms] rely on the concept of language identity [defined in paragraph 5]."
The text was updated successfully, but these errors were encountered: