Re:JavaScript Promises: There and back again
by ufo on Tuesday December 17, 2013 @10:45PM
(#6925771)
While I agree that using callback parameters instead of variable assignment is a bit fugly I think its not that bad and just takes think some time to get used to. For me, the thing that really benefits the most from generator syntax is structured control flow, specially loops: if you use generators you can use the existing JS for and while loop which is much better than doing the same with raw callbacks (manual recursion is basically gotos) or a an async library (promise-based or not, its going to be very verbose and still won't play well with "break" and "return" statements).
[ Parent
| on HN ]
There are no comments on this comment yet.