Skip to content

Commit

Permalink
Editorial: clarify that Map/Set do not literally use SameValueZero
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkot committed Nov 20, 2024
1 parent 5881c1f commit 6583d07
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -1757,9 +1757,8 @@ <h1>Numeric Types</h1>
`[x].includes(y)`
</td>
<td>
Array, Map, and Set methods,
via <emu-xref href="#sec-samevaluezero" title></emu-xref>,
to test value equality, ignoring the difference between *+0*<sub>𝔽</sub> and *-0*<sub>𝔽</sub>
to test value equality, ignoring the difference between *+0*<sub>𝔽</sub> and *-0*<sub>𝔽</sub>, as in Array, Map, and Set methods
</td>
<td>
Boolean
Expand Down Expand Up @@ -42013,7 +42012,7 @@ <h1>Keyed Collections</h1>

<emu-clause id="sec-map-objects">
<h1>Map Objects</h1>
<p>Maps are collections of key/value pairs where both the keys and values may be arbitrary ECMAScript language values. A distinct key value may only occur in one key/value pair within the Map's collection. Distinct key values are discriminated using the SameValueZero comparison algorithm.</p>
<p>Maps are collections of key/value pairs where both the keys and values may be arbitrary ECMAScript language values. A distinct key value may only occur in one key/value pair within the Map's collection. Distinct key values are discriminated using the semantics of the SameValueZero comparison algorithm.</p>
<p>Maps must be implemented using either hash tables or other mechanisms that, on average, provide access times that are sublinear on the number of elements in the collection. The data structure used in this specification is only intended to describe the required observable semantics of Maps. It is not intended to be a viable implementation model.</p>

<emu-clause id="sec-map-constructor">
Expand Down Expand Up @@ -42368,7 +42367,7 @@ <h1>%MapIteratorPrototype% [ %Symbol.toStringTag% ]</h1>

<emu-clause id="sec-set-objects">
<h1>Set Objects</h1>
<p>Set objects are collections of ECMAScript language values. A distinct value may only occur once as an element of a Set's collection. Distinct values are discriminated using the SameValueZero comparison algorithm.</p>
<p>Set objects are collections of ECMAScript language values. A distinct value may only occur once as an element of a Set's collection. Distinct values are discriminated using the semantics of the SameValueZero comparison algorithm.</p>
<p>Set objects must be implemented using either hash tables or other mechanisms that, on average, provide access times that are sublinear on the number of elements in the collection. The data structure used in this specification is only intended to describe the required observable semantics of Set objects. It is not intended to be a viable implementation model.</p>

<emu-clause id="sec-abstract-operations-for-set-objects">
Expand Down

0 comments on commit 6583d07

Please sign in to comment.