eq? behavior changed on Racket CS?

42 показвания
Преминаване към първото непрочетено съобщение

Stephen Chang

непрочетено,
20.05.2021 г., 19:18:3920.05.21 г.
до Racket Users
Hi everyone, Has eq? behavior changed with Racket CS? (ie, 8.0+)

Specifically:

$ racket79/bin/racket
Welcome to Racket v7.9 [bc].
> (eq? (integer->char 955) (integer->char 955))
#f

$ plt/racket/bin/racket
Welcome to Racket v8.1.0.6 [cs].
> (eq? (integer->char 955) (integer->char 955))
#t

Is this expected behavior?

(I know this has probably been addressed and I wasn't paying
attention, but I did a quick search of the list and docs and couldnt
find anything, so just want to double check. Thanks!)

Steve

Matthew Flatt

непрочетено,
20.05.2021 г., 19:28:5020.05.21 г.
до Stephen Chang,Racket Users
Yes, this is an expected difference. The Racket documentation still
only promises `eq?` for characters with scalar values in the range 0 to
255, but Chez Scheme characters are always `eq?` when they are `eqv?`.
> --
> You received this message because you are subscribed to the Google Groups
> "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to racket-users...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/racket-users/CAFfiA1LQw_ECHrgRN%3DfrK9H%2BE8kS
> FFEqdShqSdvXXmfCmcB0Eg%40mail.gmail.com.
Отговор до всички
Отговор до автора
Препращане
0 нови съобщения