this post was submitted on 12 Feb 2026
42 points (93.8% liked)

Programming Humor

3362 readers
1 users here now

Related Communities !programmerhumor@lemmy.ml !programmer_humor@programming.dev !programmerhumor@kbin.social !programming_horror@programming.dev

Other Programming Communities !programming@beehaw.org !programming@programming.dev !programming@lemmy.ml !programming@kbin.social !learn_programming@programming.dev !functional_programming@programming.dev !embedded_prog@lemmy.ml

founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] lurch@sh.itjust.works -3 points 3 days ago (2 children)

It's nice and clean, but it's not OO.

One big difference is: You have to pass the "object" as parameter for everything that modifies it. You could use globals, but then you can only have one "object".

Still better than undescriptive naming.

[–] jerkface@lemmy.ca 5 points 3 days ago* (last edited 3 days ago)

explicitly passing the self variable doesn't make it not OOP.

[–] Wolfizen@pawb.social 3 points 3 days ago

I disagree. I believe this is object oriented and the object is Point.

You're right that the syntax looks different. But whether the object is before the function name: obj.fn(p) or after the function name: fn(obj, p) does not change its status as a parameter. It is still required to be present in the invocation in both cases.

Object oriented isn't about where the parameters go, it is about how the program is organised and designed.