[Haskell-cafe] How did iteratees get their names?

Ertugrul Söylemez es at ertes.de
Wed Dec 7 15:48:12 CET 2011


Douglas McClean <douglas.mcclean at gmail.com> wrote:

> I love iteratees as a paradigm for IO, but I am having trouble
> developing a relationship with the names. Could someone explain their
> origin?
>
> It seems like if iteratees consume things, enumerators produce them,
> andenumeratees do both that names like Sink, Source, and Transformer
> or Consumer, Producer, and Transformer might be more relatable
> choices?  Is there some reason apart from convention why these names
> wouldn't fit the concepts well?

Well, everything in the iteratee concept is an iteratee.  An enumerator
is itself an iteratee (that usually just isn't fed with input).  Hence
those clearer names wouldn't really fit.

An enumeratee is an iteratee that takes another iteratee and feeds it
with input.  It might use its own input for that.  An enumerator is a
special case of that, which ignores its own input.

Just like chatter and chattee, employer and employee, there is an
iterator (usually as part of an enumerator/ee) and an iteratee.


Greets,
Ertugrul


-- 
nightmare = unsafePerformIO (getWrongWife >>= sex)
http://ertes.de/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20111207/f61da7a6/attachment.pgp>


More information about the Haskell-Cafe mailing list