3 ms·
In Java you can (and should) implement equality semantics however you want for Objects by implementing equals/hashCode. If you just want value semantics you can
by dropofwill 6y ago
In Java you can (and should) implement equality semantics however you want for Objects by implementing equals/hashCode. If you just want value semantics you can use a record type, which works just like the Clojure example.
- wtetzner 6y agoI think the point is that in Clojure you get value semantics out of the box, but in Java you have to put in extra effort to get it.