[REBOL] Re: On mutability and sameness
From: g:santilli:tiscalinet:it at: 15-Jun-2001 19:30
Hello Joel!
On 15-Giu-01, you wrote:
JN> The differences in our models arise from the difference in
JN> what each of us assumes as a basis, and what each of us
JN> consequently must explain in a less intuitive fashion.
MY MODEL:
simple (scalar) value:
+----+
| |
+----+
series (reference) value:
+----+ +----- ... -----+
| |---->| ... |
+----+ +----- ... -----+
(where the boxes represent memory areas).
SAME? checks only the first memory area and returns true if it has
the same content. EQUAL? checks both the first and the second
(where present) memory area to se if they have the same content.
>> a: [1 2 3]
== [1 2 3]
>> b: next a
== [2 3]
>> same? a b
== false
>> same? next a b
== true
Regards,
Gabriele.
--
Gabriele Santilli <[giesse--writeme--com]> - Amigan - REBOL programmer
Amiga Group Italia sez. L'Aquila -- http://www.amyresource.it/AGI/