mixins

mixins

 英

  • 网络混入;混合插入;混合类型

例句

Mixins can be instantiated with different parent classes depending on the requirements of a particular context.

根据特定上下文要求可以不同实例化mixin

Mixins are allowed to have parameters, just like components.

混合允许参数组件一样

By incorporating mixins using generic types, we are able to work around many of the key limitations of other formulations of mixins.

通过使用类型合并mixin我们解决其它mixin公式许多关键限制

The reason: both mixins and generic classes can be thought of as functions mapping existing classes to new classes.

原因mixin泛型认为现有映射函数

Nevertheless, it's a very unfortunate restriction because it limits the set of classes eligible to be turned into mixins.

然而仍是一个非常遗憾约束因为限制适合转换mixin集合

But it is appealing, almost seductive, to incorporate mixins as part of a generic type system.

但是合并mixin作为型类型系统一部分吸引人几乎可以魅力无穷

Mixins can be viewed as functions mapping existing classes to new subclasses.

mixin视为现有映射函数

The Mixins annotation allows a list of mixing names to be specified.

Mixins标注允许指定一个混合名字列表

Mixins: allow to extract common groups of properties, name them and then include them in selectors.

混合类型允许开发者抽象性质共同点然后命名并且加入选择器

When mixins are formulated as generic classes, the problem of accidental overrides is particularly nasty.

mixin明确表述泛型意外覆盖问题特别讨厌

With mixins formulated as generic classes, we always have a handle on the parent class, the type parameter that the class extends.

mixin明确表述我们始终句柄继承类型参数

However, there are other significant difficulties with formulating mixins as generic types.

但是mixin明确表述泛型类型其它一些明显困难

This can mean generating new objects from a runtime definition or based on mixins of existing types or objects.

可能意味产生物体一个运行基础定义mixins现有类型对象

Mixins are classes that are parameterized by their parent class.

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只是这些语言一种设计模式语言级别支持它们应该毫无问题

Static members are associated with instantiations of mixins; there are no "shared" static members of mixins.

静态成员mixin实例化相关没有共享mixin静态成员

In the case of mixins as generic types, we can apply the same solution.

mixin作为泛型类型情况我们可以应用同样解决方案

Thus, in Jam, the visitor pattern can't be used with mixins.

因此Jam访问者模式不能mixin一起使用

This is where a very useful feature comes in: Mixins.

Ruby一个非常有用特性Mixin可以我们完成方面工作