help-gnu-emacs
[Top][All Lists]
Advanced

[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 21:49:13 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

Barry Margolin <barry.margolin@level3.com> writes:
> In article <mailman.2095.1066762882.21628.help-gnu-emacs@gnu.org>,
> Lars Brinkhoff  <lars@nocrew.org> wrote:
> >Stefan Monnier <monnier@iro.umontreal.ca> writes:
> >> > Is there a function, say object-identity, in Emacs Lisp that maps an
> >> > object to a unique value (other than the object itself)?
> >> I'm wondering what you want it for.
> >In the implementation of Common Lisp's print-unreadable-object when
> >:identity t is supplied.
> AFAIK, there's no guarantee that the same object will print identically
> over time.  Most implementations just display the object's current address;
> if the GC moves it, the next time it's printed it will be different.

Excellent, then the functionality I would need shouldn't that hard to
implement.

> Anyway, there's a reason why Common Lisp requires that
> PRINT-UNREADABLE-OBJECT be built into the implementation.  We didn't
> want to expose an interface to getting these not-quite-unique
> identifiers.  They're not much use for anything other than this one
> function; if we provided the API, users would undoubtedly misuse it.

I have no desire to get the not-quite-unique identifiers in Common
Lisp.  I want to implement PRINT-UNREADABLE-OBJECT in Emacs Lisp.

-- 
Lars Brinkhoff,         Services for Unix, Linux, GCC, HTTP
Brinkhoff Consulting    http://www.brinkhoff.se/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]