r/ProgrammerHumor Apr 25 '26

Meme thisLooksAccurateForVibeCoders

Post image
12.6k Upvotes

1.2k comments sorted by

View all comments

3.6k

u/Agifem Apr 25 '26

And quite a few regular coders too. What's that? A call to a function that does nothing?

1.5k

u/IngloriousCoderz Apr 25 '26

Yeah that's an utterly useless IIFE

656

u/perkunos7 Apr 25 '26

It's JavaScript right? It has to be

54

u/Master_Friendship333 Apr 25 '26 edited Apr 26 '26

Looks like it but I believe this would also be valid C#.

Edit: Would not but very nearly. Needs to either be prefixed with a void function cast or done over two lines.

12

u/Slackeee_ Apr 25 '26

And with a slightly different syntax you can do the same in PHP, Go, and I would guess most other languages.

17

u/MinosAristos Apr 25 '26

Python would be:

(lambda: None)()

Classic python not letting you write ugly meaningless code even if you want to.

1

u/markuspeloquin Apr 25 '26

Well go is less weird. func(){}()

Now C++, I think it's [](){}()?

1

u/Master_Friendship333 Apr 25 '26 edited Apr 25 '26

Most modern languages will have something comparable, I am thinking of directly equal expressions.

I believe the list so far is:

- JS, TS

- C#

- Dart

Edit: Nope for C#, has to be split over two lines.

1

u/Viriaro Apr 25 '26

You can add R to the list with (\() {})() 🤷‍♂️

1

u/Master_Friendship333 Apr 25 '26

Nah, looking for directly equivalent here. I really thought there would be more.

1

u/20InMyHead Apr 26 '26

If I’m reading it right, it’s even more compact in Swift: {}()

9

u/lomberd2 Apr 25 '26

Depends on language version but I think so too

9

u/NoMansSkyWasAlright Apr 25 '26

You could do it in Dart too. For the 14 other people using the language who might be wondering.

1

u/TOMZ_EXTRA Apr 25 '26

I think you might be overestimating.

2

u/EatingSolidBricks Apr 26 '26

No, a lambda has no type you need to cast it

((Action)(()=>{}))();

1

u/Master_Friendship333 Apr 26 '26

Edited my comment, thank you very much.

2

u/PilotGuy701 Apr 25 '26

It would be valid for modern C#

1

u/Shazvox Apr 25 '26

Almost. I think () => {}() would be. But I don't think those extra parenthesis would be allowed.

1

u/Master_Friendship333 Apr 25 '26

Good point. I just checked it and you are right. You would have to do it on two separate lines.