this post was submitted on 10 Feb 2026
187 points (95.2% liked)
Programmer Humor
29635 readers
2143 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
It might be nice to use in some very specific cases (e.g. addition-operation is a binary-operation AST node which is an AST node).
In most of the cases it just creates noise though, and you can usually do something different anyway to implement the same feature. For example in rust, just use enums and list all the possible cases and it's even nicer to use than inheritance.