prototype-based(原型式的/基于原型的):指一种(多见于编程语言与面向对象模型中)以“原型对象”作为继承与复用基础的机制;对象可以直接从另一个对象复制/委托属性与方法,而不必先定义“类”。(也常用来对比 class-based“基于类的”体系。)
/ˈproʊtəˌtaɪp beɪst/
Prototype-based languages let objects inherit directly from other objects.
原型式语言允许对象直接从其他对象继承。
In a prototype-based system, delegation can replace class hierarchies for sharing behavior across many objects.
在基于原型的系统中,“委托”可以取代类层级结构,用来在多个对象之间共享行为。
prototype 源自希腊语 prōtotypon,意为“最初的样本/原型”(prōto- “第一” + typos “印记/模型”);加上 -based(“以……为基础的”)构成形容词短语 prototype-based,即“以原型为基础的”。