Re: please answer these questions as soon as possible. because i have exam



frebe wrote:
On Jan 6, 2:49 pm, S Perryman <q...@xxxxx> wrote:


All that identity requires is that for two different instances I1/I2 of
a type T, identity(I1) != identity(I2) .
So I1 and I2 doesn't need to be the same object? If I make a clone of
I1, can the clone be identical to the original?

The clone has the same *state* . Not the same *identity* .
That is quite a fundamental confusion you have between the two concepts.

It's pointless to talk about identity without specifying the context
in which identity holds.

If I have a client going against an RDBMS, the context is clear, it's
the RDBMS server. My client program may have an object providing a
representation in one context of employee 123456, it may have a second
representation of the same employee in a different context in the same
process space, some other client program may also have such objects,
but the identity of the employee is clear. The view that the two
client programs have of employee 123456 is the same, any changes they
make to employee 123456 become changes to the same thing, something
that they share. The concept of identity applies to the employee, not
to the memory locations or such in which properties of the employee
are temporarily stored in computer programs.

Now contrast that with how identity is talked about in OO. What's the
context? It's all over the place. Sometimes it's talked about as if
its the process space of a running application (Phlip's memory
address.) Sometimes it's ORBs and "persistent object references" and
"strong identity" and some notion of distributing identity over the
wire. Sometimes we have things like TopLink that attempt some ill
conceived forcing of identiy through caching of database accesses
through clients going through TopLink, but not others. Sometimes it's
OID's stored in the database.

Your statement "The clone has the same *state* . Not the same
*identity*." is literally true, but it's not usually the clone's
identity that we care about, rather, it's about the identity of some
thing represented in the properties of the clone and the original.
And you can't make meaningful statements about that until you specify
the context of that thing.

-- Daniel
.



Relevant Pages

  • Re: please answer these questions as soon as possible. because i have exam
    ... can the clone be identical to the original? ... The concept of identity does not depend on the context. ... representation in one context of employee 123456, ... process space, some other client program may also have such objects, ...
    (comp.object)
  • Re: Half user config and half client prog implemented
    ... I am having a hard time envisioning any sort of "employee leave" abstraction that could not be fully configured by supplying values for a fixed set of knowledge attributes. ... Often this will just be to prevent clashes, if it is a company holiday then it can't also be sick leave. ... But when it comes to annual entitlement or some special kind of compulsory company leave, then special rules will apply such as imposing an 'overdraft limit' or allowing an administrator to configure the company holidays. ... Each way probably represents a different context and, consequently, a different client object employing a different suite of rules and policies for things like conflict detection. ...
    (comp.object)
  • Re: Design problem and suggestions...
    ... A "context" table can hold person & role. ... > the both employee and customer. ... please post details of your proposed schema e.g. the new ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Why isnt shift the same as $_[0]?
    ... > returns a new object, not a clone etc, a new one. ... The "context" says if we ... - It ignores $obj altogether, ... I bet other behaviors have been implemented too. ...
    (comp.lang.perl.misc)
  • Proxy: (Fwd) [patch] make Storable thread-safe
    ... because it doesn't handle PL_modglobal's Storable context entry ... Luckily on win32 we have the issue with private memory pool per thread and ... CLONE on the perl side like I did, or just have CLONE defined in Storable.xs ... +# win32 perl implementation allocates a different memory pool for each ...
    (perl.dbi.users)