DEV Community

Discussion on: Future Javascript: Records and Tuples

Collapse
 
mdmazzola profile image
Matt Mazzola • Edited

Good post. Given the mutation operations on records and tuples are common way to simulate immutable behavior now hopefully the transition will be as simple adding # sign in certain cases.

It would be interesting to see the performance differences between the generation of new object using spread vs generating new record using spread and likewise with tuples.

Based on your first example of a record nested in record, it seems that there would be benefit to having a "deep record" symbol to implicitly make nested arrays or objects also become records or tuples.