Re: [Scheme-reports] [r6rs-discuss] Scheme pattern matching: the case for (case)
Per Bothner 22 Dec 2010 20:36 UTC
On 12/22/2010 12:15 PM, John Cowan wrote:
> Peter Kourzanov scripsit:
>
>> (define eqv? equal?)
>> (newline)
>> (write (case "asd" (("asd") #t)))
>> (newline)
>>
>> You'll find Tinyscheme, Minischeme, MIT, Scheme48/SCSH
>> included in your list. Ypsilon and Stalin exhibit this
>> behaviour for strings, but not for more structured data
>> like vectors.
>
> Chicken, Bigloo, Kawa, SISC, Chibi, STklos, and Scheme 9 also have this
> problem; Racket, Gauche, Gambit, Guile, Chez, SCM, Larceny, Mosh, and
> SSCM do not; Ikarus won't let you rebind EQV?.
"Problem" is a strange word in this context - that eqv? was defined as
equal? is
irrelevant to what is happening (at least for Kawa). The reason the result
is #t is that (as you mention elsewhere):
implementations are free to make literal strings eqv? if they have
the same content
--
--Per Bothner
per@bothner.com http://per.bothner.com/
_______________________________________________
Scheme-reports mailing list
Scheme-reports@scheme-reports.org
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports