@john, streamline is no weirder than CoffeeScript, which is also a preprocessor.
Also, if you take the time to experiment with it, you will see that the code generated in fibers mode is orders of magnitude simpler than the code generated in callback mode. The fibers output is almost identical to the streamline source. The only noticeable differences are the async function declarations and async function calls that are a little more verbose in the output than in the source. All the non- async stuff is passed verbatim, line numbers are preserved, even comments are preserved! I expect the generators output to be very similar to the fibers output. So, as your question was about a solution that prepares for the future, I think that streamline qualifies. The day generators hit the road, you'll just have to preprocess one last time and say goodbye to streamline. The output of the preprocessor will be your new source. And, unless I missed something big, this output will be, like the current fibers output, clean and very close to your streamline source. Bruno On Feb 11, 12:41 am, "john.tiger" <[email protected]> wrote: > On 02/10/2012 03:35 PM, Mikeal Rogers wrote:> i found the pattern. i bet we > can demonstrate it with graphs. > > > flow control mentioned -> fibers mentioned -> someone calls fibers > > (incompatible || a fork || "not node") -> Marcel defends fibers as "just a > > module" -> Oleg mentions common-node as "not just a module" -> Mikeal > > makes a disparaging remark -> Axel disagrees, promotes streamline. > > > if you start at any single point the other will always descend from it. > > sometimes Oleg and Mikeal are swapped in position. > > LOL - okay, since I started this, I'll try to end it - thks to all for > input. Takeaway: harmony generators probably not until end of year. > @Alexey's mongo stuff very interesting (certainly simple). We will look > at common-node as well. Node-Fibers similar but a bit different than > upcoming generators but apparently does work and does offer simpler > sequential operations. Personally, would rather deal with nested > callbacks than the weird js streamline stuff. > > > > > > > > > > > On Feb 10, 2012, at February 10, 20125:22 PM, Axel Kittenberger wrote: > > >>> comments like this make me scratch my head. > >> Lets not go into that discussion again. I think last time we > >> concluded, that projects are vastly different in their setup, and thus > >> in their needs. I can tell myself of different projects where on one I > >> was happy with callbacks and others it just went down. Last time we > >> had even talked down to examples where it was not succefully explained > >> by the "you doing it all wrong crowd" who said everything that > >> experiments with alternative designs to code than callbacks is doing > >> heresy. > > >> Anyway. I won't jump into that discussion once again :-) > > >> @john.tiger. You can also have a look at node-streamline. I rewrote a > >> web based monbodb live data analytics engine from callbacks to > >> streamline and was quite happy with the result. And don't let you drag > >> into these religous debattes, you just decide what works for you :-) > > >> -- > >> Job Board:http://jobs.nodejs.org/ > >> Posting > >> guidelines:https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines > >> You received this message because you are subscribed to the Google > >> Groups "nodejs" group. > >> To post to this group, send email to [email protected] > >> To unsubscribe from this group, send email to > >> [email protected] > >> For more options, visit this group at > >>http://groups.google.com/group/nodejs?hl=en?hl=en -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
