[Haskell-cafe] FastString a misnomer

Donald Bruce Stewart dons at cse.unsw.edu.au
Thu Oct 20 04:47:32 EDT 2005


bulatz:
> Hello John,
> 
> Thursday, October 20, 2005, 4:12:36 AM, you wrote:
> 
> JM> FastString seems to be a misnomer for this library.
> 
> JM> what it provides is a fast _byte array_ with a lot of useful
> JM> operations, but it does not provide strings since it does not enforce
> JM> character encodings in the type system, which would be vital for a real
> JM> FastString library. In any case, just had to get that off my chest :)
> 
> may be it can be named ByteArray? and then FastString.Latin1,
> FastString.UTF8... will use its utilities
> 
> also, all UTF8 utilities may be placed outside of FastString.UTF8
> module, because it can be used for something else
> 
> btw, FastString is also a bit misnamed. it's really a CompactString.
> ghc's FastString was named so, imho, just because they provided hashes
> for fast string comparision

Well, it's a PackedString really, isn't it? I changed it to FastString
after too many people grumbled about colliding with the existing
PackedString.

-- Don


More information about the Haskell-Cafe mailing list