Why are strings linked lists?

Ashley Yakeley ashley at semantic.org
Sat Nov 29 13:23:33 EST 2003


In article <16327.48238.250504.185912 at cerise.nosuchdomain.co.uk>,
 Glynn Clements <glynn.clements at virgin.net> wrote:

> Simply claiming that values of type Char are Unicode characters
> doesn't make it so.

Actually, that's exactly what makes it so.

And in article <16328.28298.217184.540118 at cerise.nosuchdomain.co.uk>,
 Glynn Clements <glynn.clements at virgin.net> wrote:

> Unless I'm missing something, the only "support" that GHC provides is
> that Char is 4 bytes.

No, on GHC a Char is a Unicode codepoint, which means it has only 
17*2^16 possible values. This by itself is the most important aspect of 
Unicode support. But most of the rest is missing.

> If you use Char to store anything other than ISO
> Latin-1 characters, none of the Haskell functions with Char in their
> signature will be of any use.

Actually, many of those functions ought to use Word8 instead.

-- 
Ashley Yakeley, Seattle WA



More information about the Haskell mailing list