[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Object identity
From: |
Lars Brinkhoff |
Subject: |
Re: Object identity |
Date: |
21 Oct 2003 19:42:35 +0200 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7 |
Barry Margolin <barry.margolin@level3.com> writes:
> Lars Brinkhoff <lars@nocrew.org> wrote:
> >Is there a function, say object-identity, in Emacs Lisp that maps an
> >object to a unique value (other than the object itself)? For example,
> >the value could be an integer, or a list of integers, or a string,
> >that represents the memory address of the object.
> I'm not sure it's possible to write such a function without significant
> overhead.
Right, I didn't consider that garbage collection (in general) can move
things around.
Stefan Monnier <monnier@iro.umontreal.ca> writes:
> > The OP explained what it's useful for: emulating weak hash tables in a
> > system that doesn't have them built in.
> That's not how I understood his article. He seemed to say that he
> currently uses an implementation of object-identity which relies on
> a weak hash-table but that his Emacs's doesn't implement weakness.
Right, that's what I meant.
> I.e. he seemed to say he needed weak hash-tables to implement
> oject-identity, not the other way around.
Well, either I need weak hash tables, or a different implementation
of object-identity.
--
Lars Brinkhoff, Services for Unix, Linux, GCC, HTTP
Brinkhoff Consulting http://www.brinkhoff.se/
- Re: Object identity, (continued)
Re: Object identity, Barry Margolin, 2003/10/21
Re: Object identity,
Lars Brinkhoff <=
Message not available