Ladislav,
I think by default REBOL copies only the state of scalar values but
makes an alias of series values. If I alias an "immutable" scalar
value, it acts just like a "mutable" series value.
>> a: 3
== 3
>> alias 'a "c"
== c
>> a: 4
== 4
>> c
== 4
>> same? a c
== true
>> unset 'a
>> c
** Script Error: c has no value.
** Where: c
>> a: "string"
== "string"
>> c: a
== "string"
>> a: "fancy"
== "fancy"
>> c
== "fancy"
>> same? a c
== true
>> unset 'a
>> c
** Script Error: c has no value.
** Where: c
Likewise, if I copy a string, it acts like a scalar value.
>> a: "string"
== "string"
>> c: copy a
== "string"
>> c: "fancy"
== "fancy"
>> a
== "string"
I don't believe that REBOL means to keep us from changing DATE! and
TIME! (or TUPLE!) values, as Joel demonstrated. This is probably a bug
and should be reported as such.
It's true that series values are not simple, and REBOL sometimes shows
us only the head or tail of the series at the console (as in your
original "probe" example). It's also true that for scalar values, same?
and equal? seem redundant. Perhaps that is a design flaw. I also think
that empty? is not defined the best way. Perhaps same? should only
return true when two scalars are alaised, and not just equal. (Is there
any way to tell when two scalars are aliased? (without changing their
value))
-Ted.