多态的本意:是抽象类型具体实现的多样化;
然后对具体类型的行为,作出或相同或不同的解释;
多态是一个类型理论的名词;对抽象类型的行为作出了解释;
抽象类型的指代作用举例:
这个牛是一头白牛,这个牛(这头白牛)........
The most commonly recognised major classes of polymorphism are:
- Ad hoc polymorphism: defines a common interface for an arbitrary set of individually specified types.
- Parametric polymorphism: when one or more types are not specified by name but by abstract symbols that can represent any type.
https://en.wikipedia.org/wiki/Polymorphism_(computer_science)#Static_and_dynamic_polymorphism
原文地址:https://www.cnblogs.com/feng9exe/p/10595539.html
时间: 2024-10-11 16:51:25