aralejs / class

Class Utility
aralejs.org/class
102 stars 88 forks source link

Class.create() 模拟类 不错,推荐使用。 #5

Closed ghost closed 11 years ago

ghost commented 11 years ago

与extend()相比,extend()表示用 shallow copy 来实现继承。另外还有 extendDeep() 深拷贝。 所以,推荐用 Class.create() 模拟类式继承。

popomore commented 11 years ago

没怎么看明白。

create 是创建某个类,extend 是继承某个类,功能不同