基于类的继承展示了它在创建大型编程系统(尤其是 GUI 系统)中的有用性。
如何在现实生活中应用基于原型(prototype)的继承?我们应该如何构建系统而不是创建类层次结构?
对于基于类的 OOP,是否存在任何基于真正原型(prototype)的 OOP 的编程模式?
最佳答案
nahab: Are here exist any programming patterns for real prototypical based OOP as exists for class-based OOP ?
这question应该会指导您找到一些关于实用 Javascript 设计模式的好资源。
nahab: How can be applied Prototypical-based inheritance in real life applications? How we should build system instead of creating classes hierarchies?
参见 this list Lua 用户(另一种基于原型(prototype)的语言),注意到它在 Adobe Lightroom 中的使用。
关于javascript - 基于原型(prototype)继承在实际项目中的应用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6003014/