-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
change name from Tuple to ImmutableArray and Record to ImmutableObject #217
Comments
There are some major differences between Tuple and Array besides whether they are Immutable or not. |
They also don't have an identity. |
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. 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: