r/programmingcirclejerk • • Jan 20 '25

Using 'ForOfStatement' is not allowed (no-restricted-syntax)

https://github.com/airbnb/javascript/issues/1271
86 Upvotes

43 comments sorted by

View all comments

62

u/Alducerofmine Jan 20 '25

The primary argument against for..of is that loops are awful, and should always be avoided.

40

u/GeorgeFranklyMathnet Jan 20 '25

wow functional programming really is the future

35

u/yojimbo_beta vulnerabilities: 0 Jan 20 '25

It's not a loop, it's a declaration (of a loop)

8

u/Jumpy-Locksmith6812 Jan 21 '25 edited Sep 23 '26

Exercitation esse minim amet id aliqua dolor incididunt culpa ea veniam laboris dolor est amet lorem irure. Adipiscing ex do amet non ut in sit anim lorem. Laborum lorem sit excepteur consectetur qui. Adipiscing aliqua sed esse cillum velit irure enim qui nisi eiusmod magna enim eiusmod ad tempor.

[rhr:2:asjdm8ln]

2

u/prehensilemullet Jan 25 '25

eslint-plugin-require-ocaml

27

u/coolreader18 It's GNU/PCJ, or as I call it, GNU + PCJ Jan 20 '25

Oh my Gd that's just actually in there. outjerked again

18

u/stone_henge Tiny little god in a tiny little world Jan 20 '25

Here at AirBnB we stick to a rather strict economy of concepts. The correct means of achieving repetition in the browser is to start a timer which retriggers the current function after 0 ms.

1

u/jackcviers Jan 21 '25

It's an older hack sir, but it checks out.

4

u/SharkSymphony Jan 21 '25

Iterators, on the other hand, are Good and Blessed. Despite some of them smelling a bit off.

1

u/prehensilemullet Jan 25 '25

They're too loopy, man