this post was submitted on 09 Aug 2024
607 points (98.1% liked)
Programmer Humor
32589 readers
920 users here now
Post funny things about programming here! (Or just rant about your favourite programming language.)
Rules:
- Posts must be relevant to programming, programmers, or computer science.
- No NSFW content.
- Jokes must be in good taste. No hate speech, bigotry, etc.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Oh for sure. I have nothing against getters and setters when they're justified, but in the case of bare fields with no validation like that example it's just annoying.
Also stuff like this just grinds my gears (oversimplified example again):
Just make it a bloody function.
You may say it's silly, but I've genuinely found code like this in the wild. Not that exact code snippet of course but that was the spirit.