5 ms·
Note that F# has the `[<NoEquality>]` attribute for exactly that sort of case.
by Smaug123 6y ago
Note that F# has the `[<NoEquality>]` attribute for exactly that sort of case.
- masklinn 6y agoThat'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.