>>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?
Good question -- How should we expect these operations to perform when
more than one variable points to the same series?
The docs say:
"It is crucial for you to realize that the block exists on its own, and
that COLORS simply refers to the head of the block."
<http://www.rebol.com/users.html#Traversing>
So, it's not a matter of LIST1 (or COLORS) knowing about the other
variables pointing to it. Both LIST1 and all other variables point to a
block which exists independently of LIST1. (Just as a person exists
independantly of an email address or Social Security Number.)
We're also warned that:
"The change, insert, remove, and clear functions directly affect the
series provided as the first argument. If you have other variables that
refer to the same series, after the operation they may no longer
reference the same value within the series."
<http://www.rebol.com/users.html#Modifying>
and that
"If a series function attempts to access a value that is beyond the
head or tail of a series, it will return none to indicate that there
was a problem."
<http://www.rebol.com/users.html#Dealing>
So it seems the expected response of several of the examples posted
should have been:
== none
or
== false
rather than
== ** Script Error: Out of range or past end.
*********** REPLY SEPARATOR ***********
On 12/11/1999 at 11:22 AM [EMAIL PROTECTED] wrote:
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?