Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

My impression is the opposite, especially from when I used to work as a full-time Java dev. I often asked myself:

Is there a place outside of GUI programming where inheritance is used in non-habitual and useful way? I can't think of many.

More often than not you have a final class that you are supposed to use and the petrified hierarchy above that is of not much use.



Perhaps having some abstract class with a real and mock implementation inheriting from it, which can then be injected into your code for testing other components is one example.


I actually think with generics without type erasure and duck typing a language doesn't need inheritance. And when applications are built around passing data between services OOP tends to be less useful. (eggs are passed to the frying pan service and bread goes to the toaster service)




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: