News for hackers. Stuff that matters.
Re:Inheritance Is Terrible by cubano on Saturday March 19, 2016 @05:06PM (#11320446)
Why not just bake the various Price components right into Item, besides the get_price action? Every Item should have a price (ie the get_price stub), so I don't think it would be bad design to include it.

If Item includes a Price object that has all the possible Price properties, it could be easily modified as specs change.

Re:Inheritance Is Terrible by danso on Saturday March 19, 2016 @05:09PM (#11320459)
I think the problem is that, typically, all the various Price components are not known a priori when Item is first implemented. They become known or realized as more Item subclasses are created. If a software dev group actually knew all of their future requirements before implementing a framework...well, a whole lot of software engineering problems would be mitigated :)
Re:Inheritance Is Terrible by cubano on Saturday March 19, 2016 @05:25PM (#11320532)
Ok, but it surely can be known (and obviously was due to the get_price() interface stub) that every Item will have a Price, so I stand by my intuition that a Price object could be included in Item.