[REBOL] Re: Puzzle with FIND and SELECT
From: g:santilli:tiscalinet:it at: 10-Feb-2003 15:38
Hi Joel,
On Monday, February 10, 2003, 2:33:40 PM, you wrote:
JN> >> foo: [1 2 3.0 4 5] == [1 2 3 4 5]
JN> >> find foo 3 == none
IMHO this is a bug since FIND is based on EQUAL? and not SAME?:
>> b: ["one" "two" "three"]
== ["one" "two" "three"]
>> find b "two"
== ["two" "three"]
>> equal? b/2 "two"
== true
>> same? b/2 "two"
== false
JN> >> same? foo/3 3 == true
and this is a bug too since they are obviously not the same value
(I'd vote for SAME? to always return false for immutable values,
so that we can consider its semantics to be "Return true if two
values are the same value").
JN> It would be nice to hear from Carl about the original intent
JN> behind some of these things.
I agree, but the only way is to send it to feedback I think.
Regards,
Gabriele.
--
Gabriele Santilli <[g--santilli--tiscalinet--it]> -- REBOL Programmer
Amigan -- AGI L'Aquila -- REB: http://web.tiscali.it/rebol/index.r