[racket-dev] racket2 suggestion: removing (or extending) eqv?

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sat May 4 22:11:27 EDT 2013

On Sat, May 4, 2013 at 9:04 PM, Jon Zeppieri <zeppieri at gmail.com> wrote:

> On Sat, May 4, 2013 at 9:46 PM, John Gateley <racket at jfoo.org> wrote:
> >
> >
> > On 5/4/2013 8:26 PM, Robby Findler wrote:
> >> Some characters have the equal? implies eq? property (the ASCII ones and
> >> maybe a few more, I'm not sure) and some don't (#\λ for example).
> >
> >
> > Excellent point, and now I understand your efficiency comment better.
> > There's a definite parallel between bignums and multi-byte characters.
>
> I disagree. There is a parallel between fixnums and characters,
> multi-byte or not, because char->integer always returns a fixnum and
> integer->char is only defined on a subset of the fixnums.
>
> However, I don't think this is any kind of knock-down argument in
> favor of eq?-ness for characters. It's just a nice-to-have.
>
>
FWIW, I think that if you had real code that would benefit from this it
would be more compelling; our nice-to-have list is already pretty long. :)


> Robby, after looking at the macros in scheme.h, I understand now why
> it would be a big job. I hadn't realized that all of the unique
> objects (like null, EOF, void, and so forth) were all represented as
> pointers to statically allocated structs. So there's a basic
> assumption that if a value doesn't satisfy SCHEME_INTP(), then it's a
> pointer.
>

Yeah, and don't forget the JIT, too....

Robby
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/dev/archive/attachments/20130504/4eaf530c/attachment.html>

Posted on the dev mailing list.