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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "push" creating circular objects


From: Pascal J. Bourguignon
Subject: Re: "push" creating circular objects
Date: Sat, 23 Aug 2008 14:17:47 +0200
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/22.2 (gnu/linux)

Charles Sebold <csebold@gmail.com> writes:

> On 21 Aug 2008, John Paul Wallington wrote:
>
>> I'm not certain what's going on.  Are you sure that representation
>> means circular structure?  Or is it merely labelling the object "ul"
>> for future reference then referring to it?  (See (elisp)Circular
>> Objects.)
>
> I am likely confused.  Is this not the same thing?
>
> Oh.  I guess it isn't.  This is one of the insights I needed, I think.
>
>> Also, how about consing up the strings with (string ?u ?l) or somesuch
>> to avoid 'em being treated as the same?
>
> I'll give that a try... yeah, that fixed it.  I'm surprised I have to do
> this, though.  Why are they being treated as the same?
>
> Knowing this, I replaced (string ?u ?l) with (copy-sequence "ul") and so
> forth, and got the same result.
>
> Thanks very much for this.  But I'm surprised I have to do it.


The syntax ##/#= is used to be able to distinguish these cases:

+-----------------------+   +-----------------------+
| (#1="ul" #1#)         |   | ("ul" "ul")           |
|                       |   |                       |
| +---+---+   +---+---+ |   | +---+---+   +---+---+ |
| | * | * |-->| * |nil| |   | | * | * |-->| * |nil| |
| +---+---+   +---+---+ |   | +---+---+   +---+---+ |
|   |           |       |   |   |           |       |
|   |  +--------+       |   |   v           v       |
|   |  |                |   | +------+    +------+  |
|   v  v                |   | | "ul" |    | "ul" |  |
| +------+              |   | +------+    +------+  |
| | "ul" |              |   +-----------------------+
| +------+              |
+-----------------------+


-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

"I have challenged the entire quality assurance team to a Bat-Leth
contest.  They will not concern us again."


reply via email to

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