[Haskell-cafe] Bytestrings vs String?
Brandon S. Allbery KF8NH
allbery at ece.cmu.edu
Mon Feb 2 22:46:36 EST 2009
On 2009 Feb 2, at 17:45, Marc Weber wrote:
> Or would it be better to implement one String class which can cope
> with everthing (performance will drop, won't it?)
There is already an IsString class, although IIRC it deals solely with
converting String to/from a member of IsString. Most of the rest
involves invoking functions as S.whatever and then importing some
variant of Data.ByteString or Data.List qualified as S. (The latter
is kinda unfortunate, but Data.String was taken to provide the
IsString class. Code would look a bit saner if Data.String reexported
Data.List for this usage model; note that this model only makes sense
with IsString, so it would be a hopefuly backward compatible addition.)
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university KF8NH
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
Url : http://www.haskell.org/pipermail/haskell-cafe/attachments/20090202/459b9ab5/PGP.bin
More information about the Haskell-Cafe
mailing list