[Haskell-cafe] Bytestrings and [Char]

Johann Höchtl johann.hoechtl at gmail.com
Mon Mar 22 08:16:43 EDT 2010


Hello, I was recentyl playing with Haskell (GHC that is) IO and text
processing.

Bytestrings and Lazy Bytestrings allow for fast and memory eficient
string (well, bytestring) handling, yet a lot of libraries do not
support them (yet)

Given the incredibly inneficient memory representation of [Char] (16
bytes? per cell) I wonder wheather String should default to lazy
batestring altogether instead of [Char].

The levenshtein distance as is on hackage uses e.g. String ([Char])
and as such is unneccessarily slow.

My question or discussion point: Why not depreciate [Char] altogether
and favour of lazy Bytestrings?

Regards,

   Johann


More information about the Haskell-Cafe mailing list