Value-Based Classes - equals/hashCode

Brian Goetz brian.goetz at
Sun Feb 15 20:14:09 UTC 2015

> And I assume this is important because extending equality to the state
> of (instead of the reference to) non-value-ish instances threatens the
> interchangeability* of values?

Right.  Without identity, the only way to compare two instances is via 
state.  All instances of the number "3" are the same value...

More information about the valhalla-dev mailing list