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

Any modern IDE will let you immediately bring up the subclasses with a single hotkey. If you have an abstract class with only a single subclass and that's not because new code is going to be added soon then yes, it's a bad design decision. Fortunately, also easy to fix with good IDEs.


In my last project every class had a corresponding abstract class, and then we used DI to use the real class. Good to be rid of it.


That sort of knee-jerk over-application of a technique will ruin any codebase in any language, unfortunately. It tends to reflect a lack of confidence by the developers. They aren't entirely sure how to get best results so fall back on religious devotion to 'best practices' even when it's inappropriate, in the hope that they can point the finger later if there are problems.




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

Search: