首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > JavaScript > JavaScript实现的“特征”,一个面向对象程序中代码重用最大化技术。

JavaScript实现的“特征”,一个面向对象程序中代码重用最大化技术。

资 源 简 介

Summary Despite the undisputed prominence of inheritance as the fundamental reuse mechanism in object-oriented programming languages, the main variants — single inheritance, multiple inheritance, prototype inheritance and mixin inheritance — all suffer from conceptual and practical problems. This project provides a Javascript implementation of traits, a simple compositional model for structuring object-oriented programs. A trait is essentially a group of pure methods that serves as a building block for classes and is a primitive unit of code reuse. In this model, classes are composed from a set of traits by specifying glue code that connects the traits together and accesses the necessary state. This library (and the above paragraph) are based on the research of Nathanael Scharli, Stephane Ducasse, Oscar Nierstrasz, and Andrew P. Black. For more information on traits see the traits website or 请点击左侧文件开始预览 !预览只提供20%的代码片段,完整代码需下载后查看 加载中 侵权举报

文 件 列 表

jstraits-0.0.2
docs
lib
changes.txt
VIP VIP
0.170478s