2 ms·
Duh. Thanks. Being tainted by tuples and records from other languages, the immutable bits didn't register. Sorry. Reading the proposal (TC39) explains all. htt
by specialist 6y ago
Duh. Thanks. Being tainted by tuples and records from other languages, the immutable bits didn't register. Sorry.
Reading the proposal (TC39) explains all. https://github.com/tc39/proposal-record-tuple https://github.com/tc39/proposal-record-tuple
Paraphrasing, if I understand TC39 correctly, an immutable map is a record and an immutable array is a tuple.
Has a certain elegance. Nicely done. While I'm inclined to like TC39, I'll chew on it to be sure.
- fnordsensei 6y agoYeah seems so. It’s a shame that they can only be shallowly cast from mutable to immutable (and will even throw errors if non-primitive values are present). Seems like quite the limitation. And yeah, I’m all for immutability as a default, but breaking so pervasive an existing API is a lot of damage.