They are in this case, but that is really an implementation detail of the 
compiler. Immutables allow many compiler optimizations precisely because they 
are distinguished only by their contents. The compiler is free to copy 
immutables how often or how seldom it likes, or intern them. Sometimes they 
might not be stored as objects at all but just as a collection of values in 
registers, or only the part of that collection that is actually needed.

If you need objects with identity you should either not use immutables or add 
an explicit identity field to distinguish them by.

Reply via email to