[Tutor] Follow up to 'class data'
Tue, 04 Dec 2001 13:02:45 -0500
On Tue, Dec 04, 2001 at 05:33:28PM -0000, firstname.lastname@example.org wrote:
> Interestingly there are some objective data to suggest that
> inheritance can actually be detrimental to maintenance since
> it is much harder to ensure that a code fix in one place won't
> cause damage some place else that inherits the changed code.
Let's say you inherit B from class A. If you change A and it
messes up B, the way I see it, could mean 2 things: either
B isn't really a subset of A and shouldn't have been inherited
from it, or the change was too broad, and you should've instead
derived another child class C from A and changed C.. That's
theory, I don't know how it pans out in practice.. and you know
what they say about the difference between theory and practice:
in theory, there is no difference, but in practice, there is :P
Thanks a lot - your post was very helpful. I had some general
idea about this stuff but it was very disorganized and I wasn't
sure about the terminology..
> Also the lack of local visibility of the functions can make
> code comprehension more difficult. This is one area where
> python and its explicit use of self and the imported module
> names actually helps a lot.
> Alan g
Cymbaline: intelligent learning mp3 player - python, linux, console.
get it at: cy.silmarill.org