3 ms·
The first half of the post was great, but I don't fully agree with the points about Java. Whilst inheritance is a problem, it seems to me we've been preferring
by amouat 12y ago
The first half of the post was great, but I don't fully agree with the points about Java.
Whilst inheritance is a problem, it seems to me we've been preferring composition over inheritance for a long time now. Single inheritance is mentioned as if it is a bad thing, but I'm not sure anyone that has seen (or worse, tried to implement) multi-inheritance in C++ would agree. Finally, I'm not convinced having a interface for a single concrete class is a bad thing. Sure, it adds some boilerplate (Java's main problem) but it forces the developer to think about the public API and makes testing easier.