On Mon, Sep 22, 2014 at 9:37 PM, Tom Boutell <t...@punkave.com> wrote:
> There's an important difference though. With a regular "if" statement > in synchronous code, if there is no else clause, that doesn't prevent > the next line *after* the if from executing. With an "if" statement in > synchronous code, every possible branch must eventually result in > callback invocation, or the "next line" unrelated to the "if" > condition will never execute. > Absolutely - I don't disagree with that at all. Like I said, async code doesn't deal with if statements very well. Maybe streamline does - I've yet to check it out. Another option might be to use Smalltalk-style class based logic, so that you don't even have if-statements. Matt. -- Job board: http://jobs.nodejs.org/ New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md Old group rules: 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 unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscr...@googlegroups.com. To post to this group, send email to nodejs@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/CAPJ5V2bvAoTdd%2Bn5MAw8dS_KzJhQMJMN23xqjnwnYEmdYLP3Tg%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.