[Haskell-beginners] Data.Char: isAlpha vs. isLetter

Brandon Allbery allbery.b at gmail.com
Tue Sep 11 17:15:16 CEST 2012

On Tue, Sep 11, 2012 at 1:52 AM, Stayvoid <stayvoid at gmail.com> wrote:

> > Probably an alias for backward compatibility; isAlpha is C-style
> <ctype.h>
> > stuff, which was ASCII only, whereas isLetter is Unicode style.
> Both Haskell functions support non-ASCII chars.
> Does it refute your assumption?

No, it demonstrates I need to be more explicit for some people.

I did not say isAlpha is ASCII-only, I said it was *created* in an
ASCII-only time when "isAlpha" was (the Haskell version of) the common name
for the operation.  When the Char type became a Unicode codepoint instead
of an ASCII character, isAlpha would naturally have been widened to match
*and* the corresponding Unicode standard name was imported.  Leaving it as
is would have introduced bugs (of the sort that the GHC I/O subsystem had
until ghc 6.12 or thenabouts, when it was finally made to use UTF8 instead
of "ASCII"/ISO 8859-1).

brandon s allbery                                      allbery.b at gmail.com
wandering unix systems administrator (available)     (412) 475-9364 vm/sms
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20120911/c819087d/attachment.htm>

More information about the Beginners mailing list