[REBOL] Re: On mutability and sameness
From: g:santilli:tiscalinet:it at: 15-Jun-2001 19:18
Hello Ladislav!
I hope you don't mind me jumping in. :-)
On 15-Giu-01, you wrote:
LM> My POV: According to Rebol, values can be the same. If the
LM> values are the same for Rebol, they are the same for me, i.e.
LM> they are one value. If I use this approach, I know, that
LM> Rebol values are sharable, because:
LM> a: 12:30
LM> b: a
LM> same? a b ; == true
Sorry to disappoing you, Lad, but this seems to prove SAME? is not
doing what you think it is doing:
>> a: 12:30
== 12:30
>> b: a
== 12:30
>> same? a b
== true
>> b/minute: 0
== 0
>> same? a b
== false
>> b/minute: 30
== 30
>> same? a b
== true
LM> Thus, all Rebol values are sharable for me ('a and 'b are
LM> sharing the same time value). It is the Observation #1 in my
They are not, at least this cannot be determined using the SAME?
function.
LM> looked at 'b. This leads to another conclusion: SAME? lies a
LM> bit, when it says we are sharing values. We are not, we have
LM> copies sometimes. There is a problem: what does SAME? say
LM> then?
Look above. :-)
LM> Now the full classification: the observed change is a
LM> mutation of the word 'a, which changed (namely replaced) its
LM> stored value attribute, which was an integer.
(I actually think that that was a change in a context! value, not
in a word! value, but well...)
Regards,
Gabriele.
--
Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer
Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/