Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Hi Swizec - maybe the article could have been clearer - the real point was this: now that our standard iteration pattern has made obsolete by higher order functions (forEach, filter, map etc. - which are available natively as well as github :-)) lets see if we can re-purpose it for fun and learning.

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.



I know I know, I've done some pretty horrible things with for loops myself. :)

Just fell like it's important to state that one shouldn't use "fun and learning" techniques in a production environment.


i believe his point (or i liked to read it such as) was more towards the responsibility of not messing up other programmers head, just because the language gives you the power to do so.

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"




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: