Mixins and generic classes: a perfect match.
mixin和泛型类:完美组合。
This is where a very useful feature comes in: Mixins.
Ruby一个非常有用的特性Mixin可以帮我们完成这方面的工作。
Thus, in Jam, the visitor pattern can't be used with mixins.
因此,在Jam 中,访问者模式不能和mixin 一起使用。
Mixins are more useful when addressing cross-browser issues.
当解决跨浏览器的问题时,混合类型会更有用。
Mixins are allowed to have parameters, just like components.
混合允许有参数,就像组件一样。
Mixins are classes that are parameterized by their parent class.
mixin是那些由它们的父类参数化的类。
In the case of mixins as generic types, we can apply the same solution.
在mixin作为泛型类型的情况中,我们可以应用同样的解决方案。
Sass also allows to parameterize Mixins, which adds some extra flexibility.
Sass也允许将混合类型作为参数,使得混合类型的应用更加灵活。
Mixins can be viewed as functions mapping existing classes to new subclasses.
mixin可被视为将现有类映射成新子类的函数。
When mixins are formulated as generic classes, the problem of accidental overrides is particularly nasty.
当mixin被明确表述为泛型类时,意外覆盖的问题特别讨厌。
Mixins can be instantiated with different parent classes depending on the requirements of a particular context.
根据特定上下文的要求,可以用不同的父类实例化mixin。
The reason: both mixins and generic classes can be thought of as functions mapping existing classes to new classes.
原因是:mixin和泛型类都能被认为是将现有类映射到新类的函数。
Mixins may not have a template. They integrate with the component strictly in terms of invoking render phase methods.
混合组件可以没有模板。他们根据调用地呈现阶段方法和组件结合。
Nevertheless, it's a very unfortunate restriction because it limits the set of classes eligible to be turned into mixins.
然而它仍是一个非常遗憾的约束,因为它限制了适合于转换成mixin的类集合。
To support mixins through generic types, we need to have run-time representations of the generic type instantiations available.
为了通过泛型类型支持mixin,我们需要获得泛型类型实例化的运行时表示。
With mixins formulated as generic classes, we always have a handle on the parent class, the type parameter that the class extends.
将mixin明确表述为泛型类,我们就始终有父类的句柄,它是该类继承的类型参数。
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的类型和父类的类型。
Although mixins are simply a design pattern in these languages, there's no reason why they can't be supported at the language level.
尽管mixin只是这些语言中的一种设计模式,但在语言级别上支持它们应该是毫无问题的。
By incorporating mixins using generic types, we are able to work around many of the key limitations of other formulations of mixins.
通过使用泛型类型合并mixin,我们能解决其它mixin公式的许多关键限制。
Other OCCI resources might also need a mapping, such as some Links and Mixins, which are defined by the OCCI infrastructure model extension.
其他的OCCI资源可能也需要映射,例如某些Link和Mixin,它们是由OCCI基础设施模型扩展所定义。
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 混合)有所不同。
It then overrides the click method with an implementation that looks almost the same as the overridden method shown in the section called "Traits as Mixins".
然后它重写了click方法,像在“混合Traits”章节重写的方法几乎一样的实现。
Sass and LESS are meta-languages meant to simplify and improve the reusability of CSS3 by introducing nesting, variables, inheritance, mixins, and other enhancements.
Sass和LESS 是一种元语言,通过引入嵌套、变量、继承、mixin以及其它的强化来简化和提高对CSS3的可重用性。
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的编程。
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团队有意探究这样的扩展)。
We'll relate such a formulation of mixins to previous discussions of this powerful language feature, discussing the advantages and disadvantages of adding mixins through generic types.
我们会将这种mixin的表现方式与先前讨论的这种功能强大的语言特性相关联,讨论通过泛型类型添加mixin的优缺点。
We'll relate such a formulation of mixins to previous discussions of this powerful language feature, discussing the advantages and disadvantages of adding mixins through generic types.
我们会将这种mixin的表现方式与先前讨论的这种功能强大的语言特性相关联,讨论通过泛型类型添加mixin的优缺点。
应用推荐