Kevin also asked me to look at the Open/closed principle of object oriented programming, which states that software entities should be open for extension, but closed for modification. Basically, inheritance allows a programmer to add their own code to a base class without modifying that base class. That seems pretty simple, but I'm sure I'm not thinking of all the implications that brings. Also, it's interesting that Ruby doesn't seem to adhere to this principle because you can modify essentially any classes you want, even if they are base classes.
No comments:
Post a Comment