3 ms·
That's the wrong default though. There is no reason to assume equality is a sensible concept, so objects should not even be equatable by default, and you could
by masklinn 6y ago
That's the wrong default though.
There is no reason to assume equality is a sensible concept, so objects should not even be equatable by default, and you could have an attribute which gives them structural equality (with a third option of a full-blown custom equality if necessary) as e.g. Haskell or Rust handle it.
- joshsyn 6y agoAlzabraic types and records have strutural equality while classes don't have it I believe.