[Haskell-cafe] Re: String vs ByteString

Donn Cave donn at avvanta.com
Sun Aug 15 11:50:23 EDT 2010


Quoth "Bryan O'Sullivan" <bos at serpentine.com>,
> On Sat, Aug 14, 2010 at 10:07 PM, Donn Cave <donn at avvanta.com> wrote:
...
>> ByteString will continue to be the obvious choice
>> for big data loads.
>
> Don't confuse "I have big data" with "I need bytes". If you are working with
> bytes, use bytestring. If you are working with text, outside of a few narrow
> domains you should use text.

I wonder how many ByteString users are `working with bytes', in the
sense you apparently mean where the bytes are not text characters.
My impression is that in practice, there is a sizeable contingent
out here using ByteString.Char8 and relatively few applications for
the Word8 type.  Some of it should no doubt move to Text, but the
ability to work with native packed data - minimal processing and
space requirements, interoperability with foreign code, mmap, etc. -
is attractive enough that the choice can be less than obvious.

	Donn Cave, donn at avvanta.com


More information about the Haskell-Cafe mailing list