[Haskell-cafe] Re: Fwd: Semantics of iteratees, enumerators,
dagit at codersbase.com
Tue Aug 24 01:14:38 EDT 2010
I'm not a semanticist, so I apologize right now if I say something stupid or
On Mon, Aug 23, 2010 at 9:57 PM, Conal Elliott <conal at conal.net> wrote:
> So perhaps this could be a reasonable semantics?
>> Iteratee a = [Char] -> Maybe (a, [Char])
> I've been tinkering with this model as well.
> However, it doesn't really correspond to the iteratee interfaces I've seen,
> since those interfaces allow an iteratee to notice size and number of
> chunks. I suspect this ability is an accidental abstraction leak, which
> raises the question of how to patch the leak.
>From a purely practical viewpoint I feel that treating the chunking as an
abstraction leak might be missing the point. If you said, you wanted the
semantics to acknowledge the chunking but be invariant under the size or
number of the chunks then I would be happier.
I use iteratees when I need to be explicit about chunking and when I don't
want the resources to "leak outside" of the stream processing. If you took
those properties away, I wouldn't want to use it anymore because then it
would just be an inelegant way to do things.
I won't comment further in this email because I think I lack the formal
training to follow the rest of your discussion. And that is unfortunate for
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe