Shadowing

Because each frame is examined for a value before superclasses are examined, local values shadow inherited values.


> (setf (get 'fido 'legs) '((value 3)))

> (getslot 'fido 'legs)
3

In this example, fido can have only 3 legs, although the inherited default value is 4.

Contents    Page-10    Prev    Next    Page+10    Index