Skip to content
This repository was archived by the owner on Apr 15, 2025. It is now read-only.

Commit d19ccc0

Browse files
authored
Update README with withdrawn status
1 parent 5c9a6e1 commit d19ccc0

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

README.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# JavaScript Records & Tuples Proposal
22

3+
> [!IMPORTANT]
4+
> This proposal has been withdrawn [#394](https://github.com/tc39/proposal-record-tuple/issues/394)
5+
6+
----
7+
38
**Authors:**
49

510
- Robin Ricard (Bloomberg)
@@ -17,7 +22,7 @@
1722
- Dan Ehrenberg (Bloomberg)
1823
- Maxwell Heiber
1924

20-
**Stage:** 2
25+
**Stage:** Withdrawn
2126

2227
### [Try out Record and Tuple in the playground!](https://rickbutton.github.io/record-tuple-playground)
2328

@@ -56,14 +61,14 @@ Records and Tuples aim to be usable and understood with external typesystem supe
5661

5762
Today, userland libraries implement similar concepts, such as [Immutable.js](https://immutable-js.github.io/immutable-js/). Also [a previous proposal](https://github.com/sebmarkbage/ecmascript-immutable-data-structures) has been attempted but abandoned because of the complexity of the proposal and lack of sufficient use cases.
5863

59-
This new proposal is still inspired by this previous proposal but introduces some significant changes: Record and Tuples are now deeply immutable. This property is fundamentally based on the observation that, in large projects, the risk of mixing immutable and mutable data structures grows as the amount of data being stored and passed around grows as well so you'll be more likely handling large record & tuple structures. This can introduce hard-to-find bugs.
64+
This new proposal is still inspired by this previous proposal but introduces some significant changes: Record and Tuples are now deeply immutable. This property is fundamentally based on the observation that, in large projects, the risk of mixing immutable and mutable data structures grows as the amount of data being stored and passed around grows as well so you'll be more likely to handle large record & tuple structures. This can introduce hard-to-find bugs.
6065

6166
As a built-in, deeply immutable data structure, this proposal also offers a few usability advantages compared to userland libraries:
6267
- Records and Tuples are easily introspectable in a debugger, while library provided immutable types are often hard to inspect as you have to inspect through data structure details.
63-
- Because they're accessed through typical object and array idioms, no additional branching is needed in order to write a generic library that consumes both immutable and JS objects; with user libraries, method calls may be needed just in the immutable case.
68+
- Because they are accessed through typical object and array idioms, no additional branching is needed in order to write a generic library that consumes both immutable and JS objects; with user libraries, method calls may be needed just in the immutable case.
6469
- We avoid cases where developers may expensively convert between regular JS objects and immutable structures, by making it easier to just always use the immutable ones.
6570

66-
[Immer](https://github.com/mweststrate/immer) is a notable approach to immutable data structures, and prescribes a pattern for manipulation through producers and reducers. It is not providing immutable data types however, as it generates frozen objects. This same pattern can be adapted to the structures defined in this proposal in addition to frozen objects.
71+
[Immer](https://github.com/mweststrate/immer) is a notable approach to immutable data structures, and prescribes a pattern for manipulation through producers and reducers. However, it is configurable if it generates frozen objects or not. This same pattern can be adapted to the structures defined in this proposal in addition to frozen objects.
6772

6873
Deep equality as defined in user libraries can vary significantly, in part due to possible references to mutable objects. By drawing a hard line about only deeply containing primitives, Records and Tuples, and recursing through the entire structure, this proposal defines simple, unified semantics for comparisons.
6974

0 commit comments

Comments
 (0)