面向对象三大特性之多态性

来源:互联网 发布:魔兽世界7.0 数据库 编辑:程序博客网 时间:2024/06/04 19:17

引言

以下内容摘自网友@BYVoid的一条微博

面向對象的五個真正特點是:抽象、子類型、繼承、開放遞歸和動態消息處理,而不是所謂的繼承、多態、封裝。

何为开放递归?

Open recursion: an object’s methods can invoke another method in the same object using a special variable (often called self). These method calls use dynamic lookup, allowing a method defined in one object to invoke methods defined in another object that in- herits

参考资料

用星际争霸讲解面向对象的概念

0 0
原创粉丝点击