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

[REBOL] Re: Sameness - a pragmatic approach.

From: rotenca:telvia:it at: 11-Feb-2003 19:17

Hi Ladislav, i want to fire another shot in this sameness war :-)
> This implementation has got the following disadvantage: > > v: [1] > b: [[1]] > insert/only tail b v > implementation1 b v ; == 1 > > , although we know, that the value V has been stored at the position 2.
v: 1 b: [1] insert/only tail b v implementation1 b v ; == 1
> Let's improve our implementation using SAME? instead of EQUAL?:
implementation2 b v ; == 1 Do you want that i think that v has been inserted at the first position? Or do you want that i think that i can't distingue the FIRST 1 by the SECOND one. I instead think that the same? function is undefined for scalar value. Another note: When scalar value are passed to function, the function receive a copy of the value. How can a function decide with two copies, if the original values are the same? It is like to decide if the 'a string is the same with a construct like this: a: "string" same? copy a copy a ;== false --- Ciao Romano