In article <E9AxB1.7nA@ecf.toronto.edu> doylep@ecf.toronto.edu (Patrick Doyle)
writes:
In article <izhggvrukk.fsf@mocha.CS.Princeton.EDU>,
Matthias Blume <blume@mocha.cs.princeton.edu> wrote:
>
> - Things that _actually_ look the same in each and every
> respect_are_ the same. Things that we can distinguish between
> do _not_ look the same (by definition -- this is what we mean by
> being able to distinguish).
I wouldn't necessarily agree. The difficulty lies in mutable objects. If
I have two mutable objects, alike in every way, and I change one, then the
other doesn't change. [ ... ]
Sorry, you are right, but you missed my point. If there is an
operation (here: modify one object and observe the change -- or
rather: non-change -- in the other), that lets you distinguish between
the two things, then they don't look the same (and never did). It's a
matter of what one means by "they look the same".
I think if a language has the concept of mutability, then it should also
have the concept of object identity because both the cases presented in
the previous paragraph are very useful in different curcumstances.
Of course if a language has no mutability, then object identity is
unnecessary.
And moreover, if the language has both mutable _and_ immutable things,
then it should support the concept of identity for the former and not
for the latter. Since that was what started the thread: ML is such a
language, and it gets this issue exactly right.
--
-Matthias
|