4 ms·
Looks like they added sensible no-boilerplate immutable data objects, and are trying to unbox their boxed primitives, yay for common sense at long last. While
by JulianMorrison 6y ago
Looks like they added sensible no-boilerplate immutable data objects, and are trying to unbox their boxed primitives, yay for common sense at long last.
While they're about it, they should also add immutable/copying data structures.
- BoyRobot777 6y ago>While they're about it, they should also add immutable/copying data structures. They will start with records[1], but I think all value classes (Valhalla) should have this functionality eventually. You will be able to write: record Point(int x, int y){} Point pp = p with { x = 3; } [1]https://github.com/openjdk/amber-docs/blob/master/eg-drafts/reconstruction-records-and-classes.md https://github.com/openjdk/amber-docs/blob/master/eg-drafts/...
- JulianMorrison 6y agoThis is definitely good, but I'm also meaning Clojure style lists, maps, etc where you can treat any given copy of the entire data structure as one big immutable value.