摘要: 多态:抽象类型可以泛化为具有不同行为的具体类型;在运行时根据类型做出不同的行为解释; 动态:语言元素的结构和行为可以在运行时修改; 多态需要运行时的解释执行; 多态需要在运行时获取类型和行为信息从而进行修改; 动态是将可修改范围由数据扩展到指令区; 动态的本质:一切皆数据、一切皆可修改。 二者都需要 阅读全文
posted @ 2019-03-26 21:13 zzfx 阅读(319) 评论(0) 推荐(0)
摘要: One can explicitly write @objc on any Swift declaration that can be expressed in Objective-C. @objc相关的参量只能修饰类、类的成员、扩展以及只能被类实现的协议; 下面开列修饰的情况和说明 一、无修饰 N 阅读全文
posted @ 2019-03-26 19:33 zzfx 阅读(1678) 评论(0) 推荐(0)
摘要: The convention of the function, indicated by the attribute. This is similar to the language-level @convention attribute, though SIL extends the set of 阅读全文
posted @ 2019-03-26 18:06 zzfx 阅读(378) 评论(0) 推荐(0)
摘要: Metatype Types A concrete or existential metatype in SIL must describe its representation. This can be: @thin, meaning that it requires no storage and 阅读全文
posted @ 2019-03-26 17:59 zzfx 阅读(196) 评论(0) 推荐(0)
摘要: 泛型编程思想:复合类型的抽象和代码复用 阅读全文
posted @ 2019-03-26 10:50 zzfx 阅读(233) 评论(0) 推荐(0)