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

Inheritance isn’t necessary here. You achieve the same loose coupling with interfaces and you gain the benefit of your Order type not having to know how to calculate every single discount.


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

Search: