Skip to content

Commit 51c422a

Browse files
doc: add motivation to problem statement
Added a motivation section to explain the challenges of determining equality in objects.
1 parent 83f4479 commit 51c422a

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ Reviewers:
2222

2323
Determine whether and/or how A and B deviate from each other—a very common need that is currently solved only for very narrow cases (primitives, and to some extent `JSON.stringify`able data structures). This issue has 2 parts: (deep) equality and details.
2424

25+
### Motivation
26+
27+
Walking an object is difficult and not fun; determining equality is difficult, requiring an enormous amount of specific knowledge that the vast majority of users don’t have. These complexities create significant barriers and risks to users.
28+
2529
### Equality (currently)
2630

2731
Primitives are mostly trivial: `Object.is` provides the strictest comparison (SameValue), and `===` (IsStrictlyEqual) is only slightly looser, failing to differentiate oppositely-signed zeros and failing to equate NaNs.

0 commit comments

Comments
 (0)