In article <email@example.com>,
Wolfgang Grieskamp <firstname.lastname@example.org> wrote:
>email@example.com (Patrick Doyle) writes:
>> Can you give an example of two immutable objects, alike in every way,
>> which need to be distinguished?
>Two read-only windows in a GUI with the same contents (and
>the application doesn't know about internal WM information such as position
>or other attributes which may distinguish them).
>Two outgoing socket connections to the same destination (and the
>application again doesn't know about internal states of the sockets).
Ok, so these are examples of two objects, alike in every way that is
observable through a given interface, which need to be distinguished
by the client of that same interface. This is important indeed. It is
a case I hadn't thought of.
>In general, this situation is quite common in modelling input/output,
>since in this case applications tend to have an incomplete or `loose'
>view on the outside world.
It's like looking at two objects and they both seem to be circles.
However, we're just looking at them from the bottom--one is actually a
cone, while the other is a cylinder. So it's important to make references
to this circle or that circle, even though we cannot otherwise distinguish
them because of our limited view.