John Millikin wrote:
If you can recall the reasoning behind using ListLike or StreamChunk,
it would be useful. Their advantages over simply using lists is not
obvious to me.

Well, one benefit is for efficient use of ByteStrings. Because the StreamChunk/ListLike class allows for non-parametric containers, you can use the fact that ByteString is a container of Word8 without unpacking it into a [Word8] first. Unpacking ByteStrings is horribly inefficient and is almost never necessary.

As for why ListLike and StreamChunk are separate classes instead of just having "class StreamChunk full elem | full -> elem", ...that I don't know. Personally, I dislike ListLike because it has far too many methods.

--
Live well,
~wren
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to