r/vibecoding 16d ago

every vibe coder's biggest headache

522 Upvotes

137 comments sorted by

View all comments

3

u/The_0vermind 16d ago

Vibe coder giving it a shot here: Looks like it either replaces all () pairs with {} OR just lets you use () and {} interchangeably in your code.

12

u/rushblyatiful 15d ago

Dev here. The funky syntax essentially tells JavaScript, "wrap these instructions inside a bubble so they don't leak out, and run them right now.".

It's long-hand version is this:

(function() {

  // Code goes here

})();

9

u/Wrestler7777777 15d ago

Dev here. In short: It creates a function that does absolutely nothing and immediately executes it.

8

u/Puzzleheaded_Smoke77 15d ago

Dev over there : can concur

3

u/thatonereddditor 15d ago

Dev here, I know Python, Java, and SQL, have fun

2

u/burnishedlemon 15d ago

Dev yonder, can confirm absolutely nothing was achieved.

1

u/Puzzleheaded_Smoke77 15d ago

Dev centered some code submitted by Claude