Eich was pushing for them in 2011 and they still haven't arrived.
Eich was pushing for them in 2011 and they still haven't arrived.
The proposal is humming along through the stages at a good pace.
They don't, using libraries that guarantee runtime immutability has a heavy performance cost in JS currently.
Is immutability part of the proposed standard? And if so, what’s the benefit over using Object.freeze?
The use of the term "tuple" here is odd; I've only ever seen it used to describe fixed-width, non-homogenous sequences. These look more like immutable lists (though I guess they can serve both purposes).
That's what they are here. Array are heterogenous in JS, and tuples are too. And since they're immutable, their size is fixed.
For instance: Rust has tuples that are fixed-length heterogenous sequences, but you can’t actually work with them as sequences in any meaningful way; you can’t map or loop or filter over them. The term “tuple”, to my mind, refers to that “multivalue” or “unlabeled-struct” kind of use case. The fact that we use arrays for that in JS always seemed to me like a historical accident/convenience.
As this is an engine feature rather than a spec thing, there is nothing me (or any other TC39 delegate) can do.
Google and Mozilla simply chose to ignore the spec.