this post was submitted on 22 Jul 2025
469 points (97.4% liked)
Programmer Humor
25253 readers
1092 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
nah, I'm never complaining about
self
in Python after having tried thethis
andthat
nonsense in JS.oh, you're using a named function instead of an arrow fn? Guess what,
this
is not what it used to be anymore.Oh, you assigned a method to a variable before calling it? Congratulations,
this
is nowundefined
.Yes. There's no telling what
this
is.this
could be anything. We tried to keep track ofthis
, but no one knows whenthis
will change.I used to be with
this
, but then they changed whatthis
was.Now what I'm with isn't
this
, and what'sthis
seems weird and scary to me.This'll happen to you!
Wait there's a "that"???
Only if you define it.
const that = this
I remember that a long time ago. Oh god
I remember this too... what a nightmare.
it's common practice as a workaround to save
this
when changing contexts, sincethis
may change under you, in callbacks and suchKotlin:
Yeah totally agree.
As a non-programmer who's occasionally dabbled with wxPython, I've entangled myself with self.parent.parent and their childs/siblings more than once. At that stage I know my project is done.