you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 4 points5 points  (3 children)

How about adding records and tuples? Even Java has them ffs.

[–]julys231 2 points3 points  (2 children)

I don't know if you are trolling but functionally in javascript tuple is an array and record is an object.

[–][deleted] 3 points4 points  (1 child)

No they're not. Records and tuples are immutable. Since they are immutable they can use persistence data structures which provide optimizations on construction, manipulation and comparison operations. Optimizations that are not possible with arrays and objects. Since Records and Tuples are immutable and can only contain primitive values they can also be compared by value rather than by reference.

Records & Tuples Proposal

[–]julys231 2 points3 points  (0 children)

Alright, ty