in reply to Real live usage of inheritance?
So my question is, when/what have you actually used inheritance (for) in a 'real' project?Indeed, many times. I've used it to determine standard data access behaviour across classes, to inherit from a base object defintion and generally adding structure to classes (e.g fielding out utility methods to a utility module so as to not clutter up the basic class definition). Perhaps the most obvious use is laziness - why bother maintaining X methods across Y classes, when you can just have your subclasses inherit from your main class and maintain the non-overriden methods there (and as you can probably guess, laziness isn't the only benefit).
_________
broquaint
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Real live usage of inheritance?
by hardburn (Abbot) on Nov 05, 2003 at 20:28 UTC | |
by broquaint (Abbot) on Nov 06, 2003 at 00:05 UTC |