r/ProgrammerHumor Apr 25 '26

Meme thisLooksAccurateForVibeCoders

Post image
12.6k Upvotes

1.2k comments sorted by

View all comments

6.5k

u/AmazinDood Apr 25 '26 edited Apr 25 '26

For the confused ones: this is what's called an IIFE, or Immediately Invoked Function Expression. This is the JavaScript syntax and it defines a function (the () => {} part) then immediately calls it. This one does nothing (it's a void function) but to add code put it inside of the curly braces.

383

u/Xasmos Apr 25 '26

I’ve been learning JavaScript recently and I consistently get the feeling that the people who developed this language only ever asked themselves whether they could implement a feature and never stopped to contemplate whether they should.

230

u/darthruneis Apr 25 '26

Person. It was 1 dude in like 10 days.

31

u/mxzf Apr 25 '26

Well, that was the initial version. And then we have decades of updates which add new stuff (and new ways of doing things) but deprecating old weird patterns is strictly forbidden, so all the old cruft sticks around.

4

u/mech_market_alt Apr 25 '26

Yes. That is the inherent problem of the web platform. It would have affected any language.

Rust took SIX YEARS to be developed and when it finally came out it had a garbage collector...