News for hackers. Stuff that matters.
Re:Inheritance Is Terrible by guelo on Saturday March 19, 2016 @05:41PM (#11320597)
I had trouble following along because I couldn't get over how backwards the code is. Why should a book object have the responsibility of adding itself to a cart? Instead of calling

  book.add_to_cart(cart)
It should be

  cart.add(book)
Re:Inheritance Is Terrible by wvenable on Saturday March 19, 2016 @05:50PM (#11320642)
I think it ruins the whole argument. It is not an argument against inheritance but an argument against bad coupling masquerading as an argument against inheritance.