Polymorphism is Cool

I feel the need to declare that polymorphism is really cool.

In programming, polymorphism is a concept that says that different objects of the same group can intelligently decide which version of the programming code to run depending on exactly which object you’re working with. A classic example is different types vehicles. Let’s say you have a collection of vehicles of different types — a car, a motorcycle, and a moped. Each of these can be described in programming as objects that contain information about themselves and different operations the programmer can do on them.

Now, if you decide that in your programming that all objects that are classified as Vehicle have a horn() operation. With polymorphism, your programming is able to select the correct horn() operation without knowing in advance what type of Vehicle it is actually looking at.

Essentially, your user could select what Vehicles to stuff into a collection of Vehicles while your programming is running, and it will stuff those Vehicles in there and then still call the correct horn() operation when the user asks for it without having any idea of what type of Vehicle it is actually looking at. And I find that cool.