In article <email@example.com>,
Lennart Augustsson <firstname.lastname@example.org> wrote:
>email@example.com (Paul Wilson) writes:
>> Matthias Blume <firstname.lastname@example.org> wrote:
>> > - Things that _actually_ look the same in each and every
>> > respect_are_ the same.
>> No. This is bad philosopy. Things that are indistinguishable
>> given a certain subjective point of view may become distinguishable
>> when you learn more about them.
>Do you have a problem with reading? :-)
I don't think so. But would I necessarily know if I did?
>Matthias Blume wrote "in each and every respect"; how can something
>look the same "in each and every respect" and then be "distinguishable
>when you learn more about them"? If objects can be distinguished when
>you learn more about them then they were not equal in each and every
I think this has been answered sufficiently by other posters (correct
me if I'm wrong), but I'm not sure exactly what you mean here, and
how it relates to programming languages.
"learn more about" doesn't necessarily mean "mutate". Depending on
how I choose to map the application semantics onto the language
semantics, I may or may not modify language-level objects when
I learn more about the conceptual objects they represent. Often,
I just make a notation in a table off to the side, rather than
modifying the object itself. The objects may in fact be immutable.
Nonetheless, I may want to distinguish between two immutable objects
that are *local* equal in every respect except object identity---so
that I *can* have different information recorded about them "off
to the side".
I'm not sure why people think this is an easy issue with a single
answer. There's no good, fixed mapping from application-level
concepts to langauge-level objects, so whatever the default in your
language is w.r.t. object identity, you'll often have to fake something
else. Which is the default is less interesting than the fact that no
language can solve all the problems for you automatically. Matthias
likes ML's default, which is an entirely reasonable attitude. I like
Scheme and Smalltalk and C's default, which lets me either use or
ignore object identity without any special hacking of tags, etc.
It's a handy kind of polymorphism.
| Paul R. Wilson, Comp. Sci. Dept., U of Texas @ Austin (email@example.com)
| Papers on memory allocators, garbage collection, memory hierarchies,
| persistence and Scheme interpreters and compilers available via ftp from
| ftp.cs.utexas.edu, in pub/garbage (or http://www.cs.utexas.edu/users/wilson/)