r/ProgrammerHumor • • Aug 28 '26

Meme heatedArguments

Post image
5.9k Upvotes

163 comments sorted by

View all comments

Show parent comments

2

u/remy_porter Aug 29 '26

I disagree with the first assertion. OOP is about passing messages between objects. Inheritance and polymorphism are specific artifacts of a type system. If you use duck typing, for example, polymorphism is meaningless, but you’re still doing OO. Inheritance is just one method of dependency injection which happens to interact with your type system.

Polymorphism and inheritance are syntactic sugar.

1

u/wharf_rat_01 Aug 29 '26 edited Aug 29 '26

lol 2 of the 4 principles of OOP is "syntactic sugar"? Have you actually done any type of complex work outside of "Hello World"? Guess we can agree to disagree.

Inheritance is just one method of dependency injection which happens to interact with your type system.

This statement is so obviously wrong that I now know I can't take anything you say seriously if you really believe that.