You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 15, 2025. It is now read-only.
In other languages, like Python, tuples or records can contains all types of values. But in this proposal, what you want implement are not the same thing, but something like deeply immutable arrays and deeply immutable objects. Using names 'Tuple' and 'Record' cannot adequately represent the meaning of deeply immutable, and will confuse people with experiences with other languages. We also need something like tuples in other languages, can contains object but immutable itself, I really wish this proposal not kill the possible of that.
The text was updated successfully, but these errors were encountered:
There are some major differences between Tuple and Array besides whether they are Immutable or not.
I think that using the word "Immutable" is confusing.
There are some major differences between Tuple and Array besides whether they are Immutable or not.
As of now, I think most developers are just going to think of them as immutable arrays, with equality/reference-by-value being a nice secondary improvement.
As to naming confusion, I think the current names are going to bring some confusion anyway. Record in the Typescript ecosystem springs to mind. I could easily see Typescript renaming (or at least aliasing) their Record utility type to avoid confusion if Tuple and Record are the final names for this proposal.
I don't know if the final names should be Tuple and Record or not, but ImmutableArray and ImmutableObject don't seem like the worst ideas. After all, we already have the various TypedArrays hightlighting their similarity to Arrays (even though there are some major differences with them too).
This issue is a duplicate of #82. We are also aware of other instances of Record & Tuple out there, notably in TypeScript, WebIDL (#116) and the ECMA262 spec (#96), however please keep in mind ImmutableObject is not an option as Records are not Objects. For further naming disussion, I invite you to discuss in #82.
In other languages, like Python, tuples or records can contains all types of values. But in this proposal, what you want implement are not the same thing, but something like deeply immutable arrays and deeply immutable objects. Using names 'Tuple' and 'Record' cannot adequately represent the meaning of deeply immutable, and will confuse people with experiences with other languages. We also need something like tuples in other languages, can contains object but immutable itself, I really wish this proposal not kill the possible of that.
The text was updated successfully, but these errors were encountered: