this post was submitted on 27 Mar 2025
225 points (99.6% liked)
Programmer Humor
22193 readers
1691 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
So what is the reason for doing it that way?
The first one returns an instance of the class, the second one is a static reference? I don't really know what I'm on about, so the words might be wrong.
Would it be an instance of the class since the first thing you're doing is pulling the one property instead of the object itself?
Interpreted it the same, but I'm coming from C++