> because you have to define named callback functions first. No you don't. I always name then in order ...
func1 = -> do something; func2() func2 = -> do something; func3() func3 = -> do something func1() On Mon, Nov 12, 2012 at 2:48 PM, Andy <[email protected]> wrote: > One of them problems even with this approach is that you write and read > code backwards. It executes bottom to top because you have to define named > callback functions first. I find it much more natural with promises because > not only is your code organized, but it reads top to bottom and is MUCH > easier to trace flow. > > On Monday, November 12, 2012 1:39:37 AM UTC-8, greelgorke wrote: >> >> >> function execCB(err, stdout,stderr){ >> require('assert').ok(~stdout.**indexOf( this )) >> } >> >> function lolAssert(){ >> var forClojure = 'lol' >> require('child_process').exec(**'echo lol', execCB.bind(forClojure)) >> } >> > -- > 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
