Statically forbid polymorphic recursion.
静态禁止多态递归。
Listing 10 Polymorphic definition of Facebook Special user.
清单10Facebook特殊用户的多态定义。
This type will be used later to dispatch polymorphic behavior.
稍后,我们将利用这种类型来分派多态行为。
And change definition of polymorphic record is presented below.
多态记录的变更定义如下。
Probing of overloaded and polymorphic functions is not supported.
不支持探测重载和多态的函数。
An even better definition of polymorphic record is presented below.
下面给出一个更好的多态记录的定义。
You saw an example of a polymorphic association earlier in Address.
在之前的Address,您已经看到了多态关联的示例。
Listing 12 a test class for a polymorphic Facebook user record.
清单12一条多态Facebook用户记录的测试类。
Listing 15 Improved polymorphic definition of Facebook Special user.
清单15Facebook特殊用户的改进多态定义。
Listing 11 Improved polymorphic definition of Facebook Special user.
清单11Facebook特殊用户的改进多态定义。
The following definitions can be used to create a polymorphic record.
下面的定义可用于创建一个多态的纪录。
Listing 13 Result of execution of polymorphic Facebook user record test.
清单13多态Facebook用户记录测试的执行结果。
Three or more tables are involved. A polymorphic query generates SQL like
涉及三张或更多的表,多态查询生成的SQL是这样的
Here's an example involving polymorphic recursion across two classes.
下面的示例涉及两个类之间的多态递归。
Protocols allow you to define polymorphic functions over preexisting types.
协议允许您在先前存在的类型上定义多态函数。
Exactly one table is required. A polymorphic query generates SQL like.
只需要一张表,一条多态查询生成的SQL大概是这样的。
A simple test class for the polymorphic special Facebook user is presented below.
下面给出一个多态Facebook特殊用户的简单测试类。
With this two definitions in place a polymorphic record can be defined as follows.
有了以上两个定义一个多态记录可以定义如下。
These proteins are highly “polymorphic” i.e., they show variation in different individuals.
这些蛋白高度多态。 例如,它们在不同的人中显示差异。
Why don't we issue a command to the compiler like "statically forbid polymorphic recursion."
为什么我们不向编译器发出类似“静态禁止多态递归”这样的命令呢?
The more serious problem is the potential for polymorphic recursion in class definitions.
更严重的问题是类定义中可能存在多态递归。
Listing 16 Result of execution of polymorphic Facebook user record test with extended definition.
清单16多态Facebook用户记录对扩展定义测试的执行结果。
Factory pattern is a common pattern for creation of polymorphic objects of different concrete types.
工厂模式是根据不同类型创建多态对象的一个常见方法。
This interface enables polymorphic behavior and thus provides flexibility in two important scenarios.
此接口允许多态行为并在下面两种重要情况下提供了灵活性。
Here are some of the more common SPU intrinsics (types are not given as most of them are polymorphic).
下面是比较常见的一些SPUintrinsic(类型没有给出,这是因为它们大多为多态)。
After all, the ability to add such polymorphic methods is one of the key advantages of an object-oriented language.
毕竟,添加这种多态方法的能力是面向对象语言的关键优势之一。
Listing 17 Result of execution of polymorphic Facebook user record test with extended definition and JSON encoding.
清单17应用JSON编码多态Facebook用户记录对扩展定义测试的执行结果。
Normally, a belongs_to relationship is with only one class, but the relationship in ContentBase is polymorphic.
通常,belongs _ to关系只有一个类,但ContentBase中的关系却是多态的。
I think this symmetry in polymorphic dispatch on multiple arguments is much more elegant than is the prior style.
我认为对多个参数进行多态分派所具有的这种对称性比先前的样式要雅致得多。
Scala is statically typed which allows it to provide generic classes, inner classes and even polymorphic methods.
Scala是静态类型的,这就允许它提供泛型类、内部类、甚至多态方法(Polymorphic Method)。
应用推荐