[Haskell-cafe] Bytestrings vs String?

Marc Weber marco-oweber at gmx.de
Mon Feb 2 17:45:40 EST 2009

A lot of people are suggesting using Bytestrings for performance,
strictness whatsoever reasons.

However how well do they talk to other libraries?

One I've in mind is hslogger right now.

Should hslogger be implemented using Strings or Bytestrings ?

Should there be two versions?

hslogger-bytestring and hslogger-string?

Or would it be better to implement one String class which can cope
with everthing (performance will drop, won't it?)

I feel it would make sense to talk about how to provide this?

In the future I'd like to explore using haskell for web developement.
So speed does matter. And I don't want my server to convert from
Bytestrings to Strings and back multiple times..

So is the best we could do compile the same library twice using
different flags ? One providing a Bytestring API, the other using

Cluttering up code by from to Bytestring conversions doesn't look
compelling to me.


Marc Weber

More information about the Haskell-Cafe mailing list