logoalt Hacker News

yxhuvud11/20/20241 replyview on HN

Why on earth do you put composition and OOP as opposing techniques? Composition is just one more technique in the OOP toolbox and there is nothing in OOP that mandates an inheritance based architecture.


Replies

crabmusket11/20/2024

Mainstream OOP languages (looking at you Java) have failed to make composition as convenient as inheritance.

show 4 replies