XP is just a number | |
PerlMonks |
Re^2: Not quite an OO tutorialby GrandFather (Saint) |
on Feb 23, 2011 at 19:35 UTC ( [id://889853]=note: print w/replies, xml ) | Need Help?? |
Indeed! Inheritance is an occasional thing and finding good succinct examples is hard. However the example isn't quite as bad as a first glance may suggest. The virtue in providing derived classes here is that you don't have to repeat the same list of values if you want to use the same object type in multiple places. There are however many other ways much the same result could be could be achieved that don't require OO let alone inheritance.
True laziness is hard work
In Section
Meditations
|
|