@isaacs, your ReadableStream#pipe does not have any error handling yet. so it won't be quite so simple when it has that.
On Fri, Jul 27, 2012 at 5:50 PM, Bruno Jouhier <bjouh...@gmail.com> wrote: > A more radical proposal would be to switch to a callback-style API. > > See > http://bjouhier.wordpress.com/2012/07/04/node-js-stream-api-events-or-callbacks/ > > Isaac's proposal is a move in the same direction (a read method). The main > difference is that Isaac uses a completion "event" while I use a completion > "callback". > > A point that I did not mention in my post: the callback API makes it trivial > to implement an "unread" method. Handy when you need to look ahead when > parsing input. > > Bruno > > > On Monday, July 16, 2012 4:25:01 AM UTC+2, Dominic wrote: >> >> I've been writing and using a lot of streams lately, >> and have some proposals for some small changes to node's streams. >> >> https://gist.github.com/3117184 >> >> in some parts it's a tightening up on expected behaviour, >> in others it's a few small changes to Stream#pipe. >> >> cheers, Dominic