Compile-Time Polymorphism and Code Bloat

Let’s look at compile-time polymorphism and code bloat.

We'll cover the following

Compile-time polymorphism

In object-oriented programming (OOP), polymorphism is achieved using inheritance. For example, if a function takes an interface as a parameter, it accepts objects of any class that inherits that interface.

Let’s recall an earlier example from a previous chapter:

Get hands-on with 1400+ tech skills courses.