Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Consider looking at Java's parallel effort #86
There has been an ongoing effort to introduce value types to Java since at least 2012. Obviously they have very different constraints, but I expect it's worth reading about their effort anyway.
I believe the current proposal is here, and some links to history here, although note that these focus more on implementation than on how it would actually be used by programmers. There's a bunch of other docs spread out in random places too, like this one from 2014 which covers a lot of details as they were at the time.
This isn't really an actionable issue; I just wanted to point it out as a potential source of inspiration (at least for questions to ask about the design). Feel free to close this once you've read it.
I've read through the links you've posted, and done a little digging on the side on this. The biggest takeaway from the State of The Values white paper (that is relevant to us here) is likely that it prefers element wise comparison and they don't have identity.
The current JEP 169 is effectively a deep freeze, where after the deep freeze it is invalid to observe the identity of the object, or attempt to mutate it. This is interesting because this is analogous to JS's current method for immutability (minus observing identity), which requires creating a mutable thing and then transitioning it to an immutable state. This JEP seems to be mostly performance oriented, which likely won't apply here since the performance benefits this JEP suggests via the
Thank you for pointing these docs out! I'll close the issue with this comment.