this post was submitted on 22 Jul 2025
465 points (97.4% liked)

Programmer Humor

25196 readers
948 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

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] latenightnoir@lemmy.blahaj.zone 4 points 2 days ago (2 children)

Kinda' looks like how a psychotic break feels:-?

[–] albbi@piefed.ca 5 points 2 days ago* (last edited 2 days ago) (1 children)

Write a new method, make sure to reference self first. Write a new method, make sure to reference self first. Call the method, make sure to reference self first.

Yeah, I can see it.

[–] amos@lemmy.zip 5 points 1 day ago

You don't reference self when calling a method, what on earth are you talking about? You start with the instance when calling the method, like most/all other OOP languages.

Also there are benefits with the explicit self/this to access instance properties. In C++ you need to make sure all class properties/members have a naming scheme that does not conflict with potential parameter names or other names of other variables.