It provides another dimension of separation of interface from implementation, to decouple what from how .
Encapsulation creates new data types by combining characteristics and behaviors.
Implementation hiding separates the interface from the implementation by making the details private . This sort of mechanical organization makes ready sense to someone with a procedural programming background. But virtual functions deal with decoupling in terms of types . In the last chapter, you saw how inheritance allows the treatment of an object as its own type or its base type. The virtual function allows one type to express its distinction from another, similar type, as long as they're both derived from the same base type.