This remarkable facility must be reconciled with static typing. A class may redefine some or all of the features which it inherits from its parents. Here it is appropriate to redefine perimeter for rectangles as there is a simpler and more efficient algorithm. The version to use in any call is determined by the run-time form of the target. This is known as dynamic binding .
Dynamic binding provides a high degree of flexibility.
This technique is particularly attractive when compared to its closest equivalent in traditional approaches. In Pascal or Ada, you would need records with variant components, and case instructions to discriminate between variants. This means that every client must know about every possible case, and that any extension may invalidate a large body of existing software. These techniques support a development mode in which every module is open and incremental. The power of polymorphism and dynamic binding demands adequate controls.