[Haskell-cafe] Re: String vs ByteString
dons at galois.com
Fri Aug 13 16:39:23 EDT 2010
There are many libraries for many purposes.
How to pick your string library in Haskell
> I find it disturbing that a modern programming language like Haskell
> still apparently forces you to choose between a representation for
> "mostly ASCII text" and Unicode.
> Surely efficient Unicode text should always be the default? And if the
> Unicode format used by the Text library is not efficient enough then
> can't that be fixed?
> On Aug 13, 10:28 pm, Ketil Malde <ke... at malde.org> wrote:
> > Johan Tibell <johan.tib... at gmail.com> writes:
> > > Here's a rule of thumb: If you have binary data, use Data.ByteString. If you
> > > have text, use Data.Text.
> > If you have a large amount of mostly ASCII text, use ByteString, since
> > Data.Text uses twice the storage. Also, ByteString might make more
> > sense if the data is in a byte-oriented encoding, and the cost of
> > encoding and decoding utf-16 would be significant.
> > -k
> > --
> > If I haven't seen further, it is by standing in the footprints of giants
> > _______________________________________________
> > Haskell-Cafe mailing list
> > Haskell-C... at haskell.orghttp://www.haskell.org/mailman/listinfo/haskell-cafe
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
More information about the Haskell-Cafe