News for hackers. Stuff that matters.
Re:Is your programming language unreasonable? (2015) by Smaug123 on Saturday October 10, 2020 @07:09AM (#24738115)
Note that F# has the `[<NoEquality>]` attribute for exactly that sort of case.
Re:Is your programming language unreasonable? (2015) by masklinn on Saturday October 10, 2020 @08:19AM (#24738444)
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.

Re:Is your programming language unreasonable? (2015) by joshsyn on Saturday October 10, 2020 @10:45AM (#24739322)
Alzabraic types and records have strutural equality while classes don't have it I believe.