r/ProgrammerHumor • • Apr 06 '22

Java is hard

Post image
5.0k Upvotes

424 comments sorted by

View all comments

Show parent comments

29

u/Cilph Apr 06 '22

The truth is you simply don't use inheritance much outside of theory. Only use it for a strict is-a relationship where you actually need to substitute it. And even then interfaces might fit your need better. Outside of that, composition feels like the way to go.

11

u/NewNugs Apr 07 '22

Tell me you're junior without telling me you're junior.

-1

u/Cilph Apr 07 '22

Or we could engage in mutually beneficial discussion rather than throwing 10-ish years of professional Java experience down the trash because "lol, junior"

1

u/NewNugs Apr 07 '22

Nah hard pass bud. I do enough arguing during the day. Good luck tho.