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
In reply to Re: Real live usage of inheritance?
by broquaint
in thread Real live usage of inheritance?
by BUU
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |