Records & Tuples Are Coming: The Next Exciting JavaScript Feature
summary
Proposal adds #records and #tuples as new immutable primitives that use hash-prefixed object/array syntax, compare by value (deep equality), and work as Map/Set keys; they only contain other primitives so immutability isn’t broken by nested objects. A related change-array-by-copy introduces non-mutating methods like toSorted, toReversed, toSpliced, with (stage 3, shipped in Safari 16). Symbols-as-weakmap-keys extends WeakMap support for unique symbols. Babel can transpile records/tuples imperfectly; full semantics remain experimental.
AI-written summary · about
chapters (13)
- 0:00Records and tuples intro
- 0:27JavaScript immutability problem
- 3:40Limitations of immutability libs
- 8:18Records and tuples solve issues
- 9:00What are records and tuples
- 13:13Comparison and equality
- 13:57Updating without mutation
- 16:27Change Array by copy
- 17:51Only primitives allowed
- 18:53Referencing objects in records
- 21:59Symbols as weak map keys
- 24:49Status and polyfills
- 27:15Q&A
related talks
38mRecords & Tuples are coming: the next exciting JavaScript feature
24mThe Next Exciting JavaScript Feature: Records & Tuples
53mThings You Don't Know About JavaScript in 2023
31mSo, what’s new in ES2025?
45mJavaScript Immutability - "Don't Go Changing"
33mImmutable data structures for functional JS
31mBack to the future of JS: the next features and amazing proposals
01h 06mReading the Spec
