logoalt Hacker News

flakes11/20/20241 replyview on HN

The common toolkits today (spring boot, google guice, etc) are much more focused on composition over inheritance, by injecting arguments and implementing pure interfaces rather than extending base classes. Older legacy Java frameworks and bad teachers are more at fault than the Java language itself IMO.


Replies

crabmusket11/20/2024

I take your point, though having `extends` as a first-class language feature surely encouraged that culture and approach in older frameworks right?

show 1 reply