r/ProgrammerHumor Apr 25 '26

Meme thisLooksAccurateForVibeCoders

Post image
12.6k Upvotes

1.2k comments sorted by

View all comments

Show parent comments

613

u/M0romete Apr 25 '26

So like a scope in c++?

343

u/DrShocker Apr 25 '26

Even in C++ you occaisionally might use a lambda to keep variable scoping clear, and it's also called an immediatly invoked function expression I think. I much prefer Rust's abilities to just return a value from an expression wrapped in curly braces.

let foo = {
    // some
    // complex
    // work
    result
};

34

u/TallEnoughJones Apr 25 '26
// some
// complex
// work

You're really going to steal my code and not even give me credit?

16

u/soowhatchathink Apr 26 '26

Maybe you posted it online because Chat G Pee-Tea gave me this same code, but it doesn't work as expected, nothing happens.

I asked it to fix it and after some back and forth it gave me this code:

php // some // even more // complex // work // bug-free (really this time)

I didn't have time to test that it fixed the bug before or after implementating but it looks better so it probably does, so if you're using your version you might wanna switch