David Wheeler <[EMAIL PROTECTED]> writes:

> On 4/16/02 11:57 AM, "Piers Cawley" <[EMAIL PROTECTED]> claimed:
>
>> Personally I'd like the default hash to return some immutable, unique
>> and probably opaque object id (something the like
>> 'Foo=HASH(0x81e2a3c)' you get from unoverloaded objects in Perl5, but
>> probably not identical). This isn't going to change as an object's
>> contents change.
>
> I would agree that such a default would be preferable, as long as I could
> overload it with my own idea of what the hash key should be. This will be
> useful for database applications, where I could have two separate objects
> that loaded the same data from the database, and are therefore "the same
> object," even though they wouldn't have the same OID. So I'd want to be able
> to say, for hash keys, use a key I define (probably including a primary key
> ID from the database).

Ah yes. I'm currently doing something like that trick with a home
rolled object store.

-- 
Piers

   "It is a truth universally acknowledged that a language in
    possession of a rich syntax must be in need of a rewrite."
         -- Jane Austen?

Reply via email to