Hi,

what you uncovered here is very interesting indeed. Have you reported it as
a bug?

Once can summarize your observation like this:
>> list: [1 2 3 4]
== [1 2 3 4]
>> list2: next list
== [2 3 4]
>> list2
== [2 3 4]
>> head list2                    <====================
== [1 2 3 4]
>> clear list
== []
>> list2
== [2 3 4]
>> head list2                     <====================
== []

1. When list is cleared, the memory it occupies is not nulled out.
2. List2 accesses list's memory storage directly at the offset it saves for
itself (i.e. current index set to two).
3. Whenever you do something that modifies something about list2, list2
appears to consult with list's settings and discovers that list has been
cleared and acts accordingly:
>> list: [1 2 3 4]
== [1 2 3 4]
>> list2: next list
== [2 3 4]
>> clear list
== []
>> insert list2 100
** Script Error: Out of range or past end.
** Where: insert list2 100

That's drastic.

Elan


At 05:42 AM 12/9/99 -0500, you wrote:
>Here's something else that I find confusing:
>
>>> list: [ 1 2 3 4 ]
>== [ 1 2 3 4 ]
>>> list2: next list
>== [ 2 3 4 ]
>>> clear list
>== []
>>> list2:
>== [ 2 3 4 ]
>>> next list2:
>** Script Error: Out of Range or Past End
>
>About every other operation I try with list2 errors. Exceptions are that I
can assign it to another variable and print it. 
>
>The exceptions are what confuse me. After clearing list, why does list2
print anything at all? 
>
>Is this part of the garbage collection bug people mention? (Is the
infamous garbage collection bug documented yet?) 
>
>*********** REPLY SEPARATOR  ***********
>
>On 12/9/1999 at 11:10 AM [EMAIL PROTECTED] wrote:
>
>Robert,
>
>empty? is kind of confusing, since it's just a synonym for tail? and doesn't
>really tell you if there are no elements in the block, as there might be some
>before the index point:
>
>>> test-block: tail [1 2 3 4 5]
>== []
>>> empty? test-block
>== true
>>> head test-block
>== [1 2 3 4 5]
>
>You can always use:
>
>>> empty? head test-block
>== false
>
>to find out if test-block is really empty.
>
>See you,
>Eric
>
>
>
>
>
>

Reply via email to