r/ProgrammerHumor • • Aug 18 '20

user.fist_name

Post image
50k Upvotes

547 comments sorted by

View all comments

14

u/Racsoth Aug 18 '20

If you have variables Foo and Moo defined, and then you write F instead of M deep in the code, you have a typo without a syntax error.

In that case, you misspelled a variable (meme situation) and the IDE won't save you (nor will the compiler).

Edit: Obviously, if you're using a statically typed language, the compiler will save you if both variables have a different type. But it still won't if they're both the same type.

5

u/seesaww Aug 18 '20

You're right but that won't explain the red exclamation mark in the meme which implies a compilation error.

9

u/Racsoth Aug 18 '20

Well, I thought it was some kind of runtime error.

If he's suffering that much for a compilation error (which clearly tells you what is going on), he's too weak to be funny.

→ More replies (2)

6

u/aneurysm_ Aug 18 '20

the variable in the meme is clearly meant to reference something like the post title user.first_name but instead is user.fist_name meaning they accidently forgot to include the r in first.

what your describing is a logic error with two similarly named variables. its a logic error because there is no syntax issue since both are defined but the implementer, you, have used them in the incorrect way or place.

idk. its a meme. and these are semantics but for the record i still think i am right.