[Haskell-cafe] Copying Arrays
johan.tibell at gmail.com
Fri May 30 07:01:29 EDT 2008
On Fri, May 30, 2008 at 12:11 PM, Duncan Coutts
<duncan.coutts at worc.ox.ac.uk> wrote:
> On Fri, 2008-05-30 at 10:38 +0200, Ketil Malde wrote:
>> "Johan Tibell" <johan.tibell at gmail.com> writes:
>> > But ByteStrings are neither ASCII nor 8-bit Latin text!
>> > The intent of the not-yet-existing Unicode string is to represent
>> > text not bytes.
>> Right, so this will replace the .Char8 modules as well?
> No, there is still a use-case for that, namely all these network
> protocols and file formats that mix binary and ASCII data.
After implementing an HTTP parser using ByteString in my web server I
can say that the only thing you need from the .Char8 module is `pack'
to be able to write byte literals. Matching bytes is better done using
something like a `ByteSet' rather than the .Char8 functions as it
gives better performance.
More information about the Haskell-Cafe