3 ms·
> One solution I considered It sounds pretty reasonable, but I have no idea how "sounds reasonable" correlates with "is helpful in practice". (I think one of t
by repsilat 8y ago
> One solution I considered
It sounds pretty reasonable, but I have no idea how "sounds reasonable" correlates with "is helpful in practice". (I think one of the commenters in the linked page might have raised that point too.)
Fulfilling axioms of equality definitely does sound useful for being able to write code, though -- having symmetry, not having to think about whether you need to write `a==b` or `b==a`, seems like it'd lighten the cognitive load.
I suppose also when the objects disagree about equality you also have some license to say "this may not do quite what you expect" and do your best to make the most of it.
> I was working on a hobby language a few years ago
Hah, you're famous enough that we've all probably heard of the language if it has seen the light of day ;-).
My own hobby language has no methods or dynamic dispatch of any kind, haha. It's a little stressful to have to come up with some equality rule that works for essentially every use-case, though -- I don't think it's sufficient to enumerate the data types in the language, I really have to go over all the ways I think they could be used :-/.
Oh well, it's fun at least.