[racket-dev] Character classification

From: Pierpaolo Bernardi (olopierpa at gmail.com)
Date: Tue Sep 4 10:54:21 EDT 2012

On Tue, Sep 4, 2012 at 3:56 PM, Doug Williams
<m.douglas.williams at gmail.com> wrote:
> I would say your function would be better named is-digit?

Good point.  However, many of the characters which are char-numeric?
are digits too, in other writing systems.

> and that the
> char-numeric? is exactly what it is intended to be with respect to
> Unicode characters, which is what a Racket character represents.

What is annoying is that char-numeric? and string->number are not compatible.

It would be fine for me to leave char-numeric? as it is and fix
string->number to accept and act sensibly on everything that passes

And I'd bet that this new definition of char-numeric? has introduced
thousands of covered bugs, which are not exposed only because most the
char-numeric? characters outside of #\0 .. #\9 occurs rarely.


Posted on the dev mailing list.