--- Brent Dax <[EMAIL PROTECTED]> wrote:
> Dave Whipp:
> # Is the address of an object constant? Or might it be
> # remapped during the life of an object. For example,
> # arrays might move when they grow too big; distributed
> # objects may move as they transfer onto different hosts;
> # a persistent object might have a new address when
> # retrieved from backing-store).
> 
> Under all systems I can think of, the memory address of an object's
> header is constant.  The data may move, but the header stays
> constant.

The '.id as memory address' scheme fails for any attempt to use 
id persistence (NOT object persistence, but ID persistence).

That is, '.id-as-addr' is only useful for "compare these two
currently-in-memory objects", as opposed to "have I EVER seen this
object", or "have I EVER-this-session seen this object", since
recording the .id of the object in a cache doesn't preclude the object
being GC'd when all other references go away.

So the value of the current .id isn't much of an ID. 

Which does not remove the value of being able to quickly and easily say
"is this current-runtime-object the same as that one?" It just suggests
that the name .id isn't very well chosen.

Other questions, like "how do I generate a persistence-unique id?", 
also beg for .id as a non-reserved name (unless we propose to add
macaddr and threadsafe timestamp as components of the standard .id --
not always a bad thing, but not a single opcode anymore...)

=Austin

Reply via email to