[Haskell-cafe] Motion to unify all the string data types
Alberto G. Corona
agocorona at gmail.com
Sat Nov 10 15:16:30 CET 2012
Andrew:
There is a ListLike package, which does this nice abstraction. but
I don't know if it is ready for and/or enough complete for serious usage.
I´m thinking into using it for the same reasons.
Anyone has some experiences to share about it?
2012/11/10 Andrew Pennebaker <andrew.pennebaker at gmail.com>
> Frequently when I'm coding in Haskell, the crux of my problem is
> converting between all the stupid string formats.
>
> You've got String, ByteString, Lazy ByteString, Text, [Word], and on and
> on... I have to constantly lookup how to convert between them, and the
> overloaded strings GHC directive doesn't work, and sometimes
> ByteString.unpack doesn't work, because it expects [Word8], not [Char].
> AAAAAAAAAAAAAAAAAAAH!!!
>
> Haskell is a wonderful playground for experimentation. I've started to
> notice that many Hackage libraries are simply instances of typeclasses
> designed a while ago, and their underlying implementations are free to play
> around with various optimizations... But they ideally all expose the same
> interface through typeclasses.
>
> Can we do the same with String? Can we pick a good compromise of lazy vs
> strict, flexible vs fast, and all use the same data structure? My vote is
> for type String = [Char], but I'm willing to switch to another data
> structure, just as long as it's consistently used.
>
> --
> Cheers,
>
> Andrew Pennebaker
> www.yellosoft.us
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
--
Alberto.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20121110/43b5f7c0/attachment.htm>
More information about the Haskell-Cafe
mailing list