A mixin can implement multiple interfaces.
一个mixin可以实现多个接口。
Scala provides a complete mixin solution, called traits.
Scala提供了完整的混合(mixin)解决方案,称为Traits。
An interface is also constructed for the parent of the mixin.
还为mixin的父类构造了一个接口。
Additionally, Jam imposes five constraints on the instantiation of a mixin.
另外,Jam对mixin的实例化强加了五个约束。
Constructors cannot be declared in a mixin, but only for mixin instantiations.
在mixin中不能声明构造器,它只适用于mixin实例化。
However, unlike an abstract class, a mixin does not try to contain the framework for a child.
然而,与抽象类不同的是,mixin并不试图包括子类的框架。
The name mixin was used because such classes can be mixed together with other classes in various ways.
之所以使用 mixin这个名称,是因为这样的类可以以各种方式与其它类混合在一起。
Without it, there is no way to ensure that a Jam mixin type will be valid across all possible instantiations.
没有它,就无法确保Jammixin类型将在所有可能的实例化上都是有效的。
If no constructors are specified in a mixin instantiation, the default zero-argument (zeroary) constructor is assumed.
如果在mixin实例化中没有指定任何构造器,那么就假定是缺省的不带参数的(zeroary)构造器。
Mixins in Jam, like ordinary classes, define types; mixin instantiations have both the type of the mixin and the type of the parent.
Jam中的mixin与普通类相似,都定义类型;mixin实例化拥有mixin的类型和父类的类型。
Class abstractions are extended by subclassing and a flexible mixin-based composition mechanism as a clean replacement for multiple inheritance.
Class的抽象可由子类化和一种灵活的基于mixin的组合机制(它可作为多重继承的简单替代方案)来扩展。
This was sometimes called a "mixin" in C++, though not to be confused with Ruby mixins (or the Scala mixin, which I'll discuss in a later article.)
这有时在 C++ 中称为 “混合”,与Ruby 的混合(或后文中探讨的Scala 混合)有所不同。
Jam mixins can be instantiated only on classes; unlike components in Jiazzi, there is no notion of mixin composition (however, the Jam team would like to explore such an extension).
只能根据类来实例化Jammixin;与Jiazzi中的组件不同的是,Jam中没有mixin组合的概念(但是,Jam团队有意探究这样的扩展)。
Although the concept of mixins has been applied to many languages, Jam is novel in that it introduces mixin-based programming rigorously in the context of a strongly typed language.
尽管mixin的概念已经应用到了许多语言中,但是Jam还是很新颖,因为它在严格类型化的语言上下文中严格引入了基于mixin的编程。
The Resource Template Mixin builds upon the concept of OS Templates.
资源模板Mixin建立在操作系统模板之上。
The Resource Template Mixin builds upon the concept of OS Templates.
资源模板Mixin建立在操作系统模板之上。
应用推荐