by Swizec · 16y ago · 0 comments
Especially in JavaScript. Please stop using for loops in favour of asynchronous recursion (or similar). Thank you.
This is what I've been using lately, pretty neat: http://github.com/caolan/async
It wasn't supposed to be taken too seriously.
BTW for-loops are not exactly the same in C, because JavaScript has no block scope.
Just fell like it's important to state that one shouldn't use "fun and learning" techniques in a production environment.
should the next programmer (usually =you+T) see the loop and think "oh, a loop" or "oh, a loop. and it uses the assignment of the each var to the conditional block... great, now i will have to go through the data we receive to make sure no element get's a value of zero"