Skip to content

Commit 2b01f08

Browse files
committed
Remove misleading "deep equality" claim.
Testing tuple equality with === gives results identical to testing the *shallow* identities of the elements in the tuple. Equality checking does not recurse further into the elements of the tuple (nor should it), so "deep equality checking" could be misleading. Deeply nested tuples containing other tuples can be deeply compared in constant time using ===, of course, and this property would extend to other internalized persistent data structures. Nevertheless, it's important for users to realize that this library treats "normal" objects and primitive values the same way a Map would treat them. With that said, "constant-time equality testing (===)" is still an accurate claim without the "deep" adjective.
1 parent 4cb2e7e commit 2b01f08

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# immutable-tuple [![Build Status](https://travis-ci.org/benjamn/immutable-tuple.svg?branch=master)](https://travis-ci.org/benjamn/immutable-tuple)
22

3-
Immutable finite list objects with constant-time deep equality testing (`===`) and no memory leaks.
3+
Immutable finite list objects with constant-time equality testing (`===`) and no memory leaks.

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "immutable-tuple",
33
"version": "0.4.1",
4-
"description": "Immutable finite list objects with constant-time deep equality testing (===) and no memory leaks",
4+
"description": "Immutable finite list objects with constant-time equality testing (===) and no memory leaks",
55
"license": "MIT",
66
"author": {
77
"name": "Ben Newman",
@@ -35,6 +35,7 @@
3535
"interned",
3636
"internalized",
3737
"memoization",
38+
"equality",
3839
"deep equality",
3940
"weakmap"
4041
],

0 commit comments

Comments
 (0)