3 ms·
> IMO object identity is almost always not needed and a sign of bad design. Sometimes you have no choice. I had multiple times where I needed to store additio
by josefx 3y ago
> IMO object identity is almost always not needed and a sign of bad design.
Sometimes you have no choice. I had multiple times where I needed to store additional data for instances of class X but had not control over it, so I had to store it in a separate structure and keep track of things by object identity.
> You either should write proper hash code
And object identity fulfills all the requirements of a "proper" hash code.