On 20.09 15:05, Dylan Thurston wrote:
> You know about the PackedString functions, right?
> 
> http://www.haskell.org/ghc/docs/6.0/html/base/Data.PackedString.html

Yes, but they are quite broken. I am using FastPackedString from 
darcs for many purposes, which is like PackedString in many 
ways.

PackedStrings use full unicode codepoints (4*size in bytes), but
having a char > 256 in them does not work if one wants to do IO.
This means essentially that the wasted space cannot be used in any
meaningfull way. 

Also concatenating PackedStrings is not very nice:
concatPS pss = packString (concat (map unpackPS pss))

And most important they need a conversion (unpackPS), before
using them with external libraries which expect Strings.

- Einar Karttunen
_______________________________________________
Haskell-Cafe mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to