[Haskell-cafe] The Proliferation of List-Like Types

Devin Mullins me at twifkak.com
Thu Feb 21 09:26:41 EST 2008


On Thu, Feb 21, 2008 at 10:21:50AM +0000, Duncan Coutts wrote:
> So I'm claiming that the single impl with boundary conversion gives us
> the best of both worlds, no code bloat due to specialisation and working
> with whichever string type you like, by converting it at the beginning
> and end. Of course only an experiment can say either way.

I think his point is that if I'm using three libraries, each of which
uses a different String type, that's a lot of boundaries. Perhaps worse
yet, if I'm a library author and I want to be a good citizen, I have to
write three versions of my code (or create my own StringLike typeclass).
I know of an example off-hand:
  http://nominolo.blogspot.com/2007/05/networkhttp-bytestrings.html
(Of course, as I read that, I see that the lazy code is different from
the strict code, but I'll just ignore that for the sake of, uh,
argument.)

(Sorry if this is a dupe; long thread, and I have to go to work.)


More information about the Haskell-Cafe mailing list