Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: On mutability and sameness

From: agem:crosswinds at: 6-Jun-2001 23:02

>>>>>>>>>>>>>>>>>> Ursprüngliche Nachricht <<<<<<<<<<<<<<<<<<
Am 06.06.01, 21:38:13, schrieb "Ladislav Mecir" <[lmecir--mbox--vol--cz]> zum Thema [REBOL] Re: On mutability and sameness:
> Hi, > a: now ; == 6-Jun-2001/22:36:26+2:00 > b: a ; == 6-Jun-2001/22:36:26+2:00 > same? a b ; == true > a/day: 7 ; == 7 > same? a b ; == false > provides evidence that the value of 'a has been replaced instead of
mutated. Veto! My POV: same? Checks if two »slots« are »binary« the same. For references this means »calling the same people«. For scalars this means the same value. Of course the value is changed. But in place.
>> a: [ 1 2 3]
== [1 2 3]
>> b: next a
== [2 3]
>> same? a b
== false
>> b: back b
== [1 2 3]
>> same? a b
== true