[Haskell-cafe] Re: String vs ByteString

Johan Tibell johan.tibell at gmail.com
Tue Aug 17 12:45:54 EDT 2010


On Tue, Aug 17, 2010 at 6:19 PM, John Millikin <jmillikin at gmail.com> wrote:

> Ruby, which has an enormous Japanese userbase, solved the problem by
> essentially defining Text = (Encoding, ByteString), and then
> re-implementing text logic for each encoding. This allows very
> efficient operation with every possible encoding, at the cost of
> increased complexity (caching decoded characters, multi-byte handling,
> etc).


This code introduce overhead as each function call needs to dispatch on the
encoding, which is unlikely to be known statically. I don't know if this
matters or not (yet another thing that needs to be measured).

-- Johan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20100817/e67815f9/attachment.html


More information about the Haskell-Cafe mailing list