See below:

Russell [EMAIL PROTECTED]
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, December 11, 1999 4:16 AM
Subject: [REBOL] RFF: empty? for blocks Re:(4)


> >>See? I guess you have to use 'copy to be sure.
>
> Thanks, Rachid, but the original idea was to have duplicate pointers to
the same block. Copying would defeat that purpose.
>
> Coincident with the empty thread, consider this:
>
> >> list1: [1 2]
> == [1 2]
> >> list2: next list1
> == [2]
> >> empty? list2
> == false
> >> clear list1
> ==[]
> >> empty? list1
> == true
> >> empty? list2
> ** Script Error: Out of range or past end.
> ** Where: empty? list2
>
> Again, REBOL allows us duplicate pointers but does not synchronize them
properly when one pointer clears the list.

I'm guessing 'clear probably doesn't "clear" the data referenced by list1
and list2, but manipulates the position pointer info carried by list1,
"polluting" the position info in list2.  But isn't it expecting a lot, or
causing a lot of overhead, to require list1 to know about all the other
words referring to the same data?  Every such word would have to know about
all the others?? Or am I not getting this?


Reply via email to