News for hackers. Stuff that matters.
Re:Is your programming language unreasonable? (2015) by mrkeen on Saturday October 10, 2020 @07:46AM (#24738287)
I'm not sure you're contradicting the author as much as taking his argument a step further. His second example is arguing for value-equality instead of reference-equality as a saner default. He created two "value-ish" Customer objects and used them to motivate his argument.

So when he writes:

>> Why not make the objects equal by default, and make reference equality testing the special case?

this refers in particular to these value objects.

I completely agree with you that InputStream should not have equals defined. A sane language would not conflate values with classes, and InputStream is not a value.

So perhaps it could be better-written as:

If defined, equality should test by value, rather than by reference.

There are no comments on this comment yet.