+ 4
What are the importance of polymorphism?
Just I want to learn the principal of Polymorphism.
4 odpowiedzi
+ 19
There are two good reasons to learn the meaning of polymorphism.
• First, using such a fancy word in casual conversation makes you sound intelligent.😉
• Second, polymorphism provides one of the most useful programming techniques of the object-oriented paradigm.
⇨ Polymorphism, which etymologically means "many forms," is the ability to treat an object of any subclass of a base class as if it were an object of the base class. A base class has, therefore, many forms: the base class itself, and any of its subclasses.
+ 6
Polymorphism is really just the point all programmers reach when they want to simplify the core of the program and want to get rid of huge lumps of logic.
In old school languages, you start bundling the calls together and passing a type. This occurs around about the time the 3rd object is dumped into the mess that you need to refactor and tidy up your naming schema so you can find things and minimize the edits for global changes...
OOP formalizes those mechanisms ( plus a bunch of other stuff) and allows you to abstract the complexities of how different types of data are handled away from how you want your program to work.
+ 2
Read about polymorphism.