News for hackers. Stuff that matters.
Re:Sane Async Patterns in JavaScript by jgreen10 on Thursday April 04, 2013 @04:14PM (#5494992)
Have you tried state machines?

My JS programming often looks something like: https://gist.github.com/anonymous/5314313

I don't really care if the APIs I use have callbacks or promises, both fit in just fine.

Re:Sane Async Patterns in JavaScript by Groxx on Thursday April 04, 2013 @07:14PM (#5495909)
Nice example :) I tend to think state machines are underused, they give you wonderfully predictable behavior.