[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ozone object identity...



On Fri, 04 May 2001, David Li wrote:
> I totally disagree with this. The state of two object to be equal
> doesn't mean they are the same (identical).
> 
> Well... Being Identical is very different from being equal. 
> 
> Let's takes a simple shopping for example. We would have the following
> objects:
> 
> User: 
>   name
>   birthday
>   gender
> 
> Order:
>   user
>   item...
> 
> On the user modeling, you always have to come up with a unique way to
> differentiate two users with equal values in their attribute. I in fact
> know at least another David Li that has the birthday as me. We are not
> identical although we have the same state in this database.
> 
> Being identical is just not the same as being equal!

software always is a model of the real world. we need to have a model of the
real world because we are not able to reflect each and every aspect of the real
world in the computer. In the real world equality _is_ identity. You per
se cannot distinguish between me and something that is in each and every
aspect equal to me. But we are not working on the real world but a model of it.
And in this model an explicit isSame() method or ID or surrogate or
whatever-you-call-it is needed to handle identity. This is because, like we see
from Davids example, in a model of the real world equality is not always the
same than identity. For the example above this means you can have more than one
David Li with the same birthday in the database - they are not identical
anyhow. (both objects might be referenced by different objects) For this
particular model of the real world this is totally okay and intended.


Falko


> 
> David Li
> 
> 
> Ola Berg wrote:
> > 
> > Matt wrote:
> > 
> > >I don't understand the need for isSame().  If two objects
> > >are the same type,
> > >and share the same state, then does it matter that they
> > >are not actually the
> > >same object?
> > 
> > I agree perfectly. They must by definition be regarded
> > as the same object. And the server mechanism must ensure 
> > that this behaviour is implemented, even if the server for
> > the sake of load balancing is instantiating many versions
> > of the same object.
> > 
> > /O
-- 
______________________________________________________________________
Falko Braeutigam                              mailto:falko@smb-tec.com
SMB GmbH                                        http://www.smb-tec.com