Summary

When people talk about the miracle of birth, they're probably not speaking of the way a superclass can give birth to subclasses or the way behavior and attributes are inherited in a hierarchy of classes. If the real world worked the same way that object-oriented coding does, every grandchild of Mozart could choose to be a brilliant composer. All descendants of Mark Twain could wax poetic about Mississippi riverboat life. Every skill your ancestors worked to achieve would be handed to you without an ounce of toil. On the scale of miracles, inheritance isn't quite up to par with continuing the existence of a species or getting a good tax break. However, it's an effective way to design software with a minimum of redundant work.

      
Comments