Michael Chermside wrote: > Andrew Koenig writes: > >>The reason for that, I think, is that there are really three kinds of >>"equality" that make sense, and only two of them are reasonably available: >> >> Value equality (==, which might be user-defined, because >> the concept of "value" can be user-defined); And there might be more than one user. >> Object identity ("is") >> >> Object equivalence (no easy way of expressing it today) >> >>By "object equivalence", I mean mutual substitutability--which is the same >>as identity for mutable objects, but not for immutable ones. But this mutual substitutability is context dependant. "is" guarantees that both objects are mutual substitutable in *any* context. "==" defines the mutual substitutability for the "default" context. Any other context is application dependant, so the comparison function should be defined by the application. Bye, Walter Dörwald
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4