eq? behavior changed on Racket CS?

46 views
Skip to first unread message

Stephen Chang

unread,
May 20, 2021, 7:18:39 PM5/20/21
to 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

unread,
May 20, 2021, 7:28:50 PM5/20/21
to 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.
Reply all
Reply to author
Forward
0 new messages