Is there already a list class? - support for specialized lists?

Udo Stenzel u.stenzel at
Sun Jan 14 14:03:44 EST 2007

Stefan O'Rear wrote:
> WordString a is a good idea, it would be *much* more efficient then
> [a], *but* it would be nowhere near as efficient as ByteString.
> WordString Word8 would require 4 or 12 bytes per character - one for
> a pointer (because you can't unpack a type variable)

Then it should be StorableString and everything would be peeked and
poked into an array of bytes.  Full performance would be recovered by
automatically specializing and inlining most code.

> Furthermore, as a selfish American, I use the US-ASCII subset of Unicode
> exclusively, and don't want my ten-gigabyte bytestrings to quadruple in
> size and sloth.  I would much rather see a Data.ByteString.UTF8.

On the other hand, as a selfish German, I use these annoying umlauts,
which means I want this coding issue solved once and for all.  Why can't
we have polymorphic StorableString (spezialized to Word8, Word16 and
Char), tagged with a (phantom?) type that denotes its encoding?  A
typesafe interface to iconv would be a good thing, too.

"Don't you know that alcohol for a young man is nothing but slow poison?"
"Slow poison, eh? Well, I'm not in any hurry."
	-- found at
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url :

More information about the Libraries mailing list