The Ecma TC39 committee is responsible for evolving the ECMAScript programming language and authoring the specification.
Changes to the language are developed by way of process which provides guidelines for evolving an addition from an idea to a fully specified feature. There are five stages where TC39 must approve acceptance for each stage:
The proposal Records and Tuples just reached stage 2, meaning the feature will be developed and will maybe included in the standard. Let’s discover it together!
Records and Tuples look like regular Objects and Arrays, but with a #
prefix which make them deeply **immutable. **They can only contain primitives and other Records and Tuples.
Record and Tuple are deeply immutable. Attempting to insert an object in them will result in a TypeError:
Equality of Records and Tuples works like that of other JS primitive like boolean and string values, comparing by contents, not identity:
assert(#{ a: 1 } === #{ a: 1 })
assert(#[1, 2] === #[1, 2])
#javascript #react #technology #programming #software-engineering