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

Honestly, very rarely. Interfaces have been far more useful to me in my career, as far as major OO concepts go. If I'm extending, it's usually because someone brought in a new requirement after a products launch that requires very similar, but not quite the same, behavior as existing work. For example, we process data feed A already, and data feed B will be very similar. Rather than modifying the existing A processor, its often easier to lift out an abstract parent class and implement A and B as extensions of it. I almost never find myself extending concrete classes.


Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: