in reply to Re^3: Philosophy of a "new" method
in thread Philosophy of a "new" method
I would also argue (again a matter of preference and style) that FloorWaxDessertTopping might be better off inheriting from a ThingsThatCanGoOnTopOfOtherThings base class if it's parents are so different.Rewriting classes into different classes so "it's better off inheriting" isn't code reuse, is it? It "reinventing the wheel".
Code reuse is this: Given some code, possibly written by something else, (re-)use it. Code reuse isn't "Hmmm, here's some code I may be able to reuse. Let's rewrite it for scratch, but then differently". The FloorWax and DessertToppings are given. Maybe written by your team member. Maybe written by some other department. Maybe you found it on CPAN.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Philosophy of a "new" method
by tospo (Hermit) on Feb 09, 2011 at 10:37 UTC |