On Fri, Jul 27, 2012 at 2:38 PM, Joran Greef <[email protected]> wrote:
> How often in practice are multiple on("end") and on("readable") events going
> to be attached?
>
> Would prefer to just have plain vanilla stream.onEnd = function() {} and
> stream.onReadable = function() {} callbacks.

'in practice' is a bit problematic here, as (IMO) we still have to
discover all the possibilities the nodejs-stream-concept gives us and
what (at the end of discovery-phase) turns out to be
practical/useful/powerful/sane.

For example, I'm writing on a module, that chains controllers. Every
controller has three stream-objects. Some of them must react to the
end of the streams of other controllers (eg flush buffered data). Its
hard for me to explain the module as a whole (Proof-of-concept: The C
in MVC with streams?) But this would definitely not work if I could
not bind multiple callbacks to one 'end' event.

Reply via email to