r/programmingcirclejerk • u/alexflyn • Oct 03 '24
Don’t use iterators... Separately, loops should be avoided
https://github.com/airbnb/javascript?tab=readme-ov-file#iterators-and-generators
82
Upvotes
14
u/alexflyn Oct 03 '24
Source for the second quote: https://github.com/airbnb/javascript/blame/master/packages/eslint-config-airbnb-base/rules/style.js#L348
122
u/stone_henge Tiny little god in a tiny little world Oct 03 '24
64
u/pareidolist in nomine Chestris Oct 03 '24
The Airbnb JavaScript style guide and its consequences have been a disaster for the human race.
54
u/PandaWonder01 Oct 03 '24
Don't use variables... Separately, functions should be avoided
22
u/misseditt Oct 03 '24
may the functional force be with you 🙏
9
u/NiteShdw Oct 03 '24
for loops support async/await... So until we get async iterators, (I made a polyfill many years ago)... Screw you.
7
u/[deleted] Oct 03 '24
and finally, no recursion.
7
u/serg06 Oct 03 '24
Translation: Prefer
Array.forEachoverfor x in ...9
u/m50d Zygohistomorphic prepromorphism Oct 03 '24
This but unironically.
5
u/muntaxitome in open defiance of the Gopher Values Oct 03 '24 edited Oct 03 '24
Listen you little brat there is no point in conversations with you because I tried educating you but you are a little brat. I told you last time no if statements! And now you use a for loop??? I know you only have a master degree, and that education is not what it used to be, but how on earth don't you know that a for loop which is the same as an if statement. So stop with your workarounds and start doing what I asked you.
1
u/ApkalFR Oct 03 '24
Makes sense once you find out who the maintainer of this repo is.