另一个问题在于对隐式类型的使用。
很多喜欢静态类型的人更偏爱隐式类型。
为什么不能一个隐式类型变量被声明在类级别吗?
Why cannot an implicitly typed variable be declared at class level?
这行程序可以正确编译运行,因为这是隐式类型转换。
The previous line of code compiles and executes correctly because there is an implied cast.
而隐式类型语言则根据语言中的语法和结构线索来确定对象的类型。
A type-inferred language determines which type an object might be based on syntactic or structural clues in the language.
正如您在前面看到的那样,静态字段初始值设定项的代码在隐式类型构造函数的内部执行。
As you saw earlier, the code for a static field initializer executes inside an implicit type constructor.
故名思意,“隐式类型局部变量”将无法用于域变量或常量的声明中,否则将导致编译错误。
Also as the name says, implicitly typed local variable, you cannot use var for field declaration or constant variables, therefore following declarations will both produce a compiler error.
请注意,在上一个示例中,没有在初始化语句的左侧对隐式类型的数组使用方括号。
In the previous example, notice that with implicitly-typed arrays, no square brackets are used on the left side of the initialization statement.
静态类型语言通常是显式类型的,但也不完全是;而动态类型语言几乎都是隐式类型的。
Statically typed languages are usually, but not exclusively, type explicit; dynamically typed languages are almost always type-inferred.
最后,我们需要使用隐式类型化变量,这样就可以为变量分配查询,不必显式声明其类型。
Finally, we need implicitly typed variables, so that we can assign the query to a variable without having to declare its type explicitly.
不同的表中相似的列应该声明为相同的类型,这样就可以不使用Oracle的隐式类型转换。
Similar columns in different tables should be declared with same data types, so that the implicit type-casting facility of Oracle is not used.
隐式类型系统一个较大的优点是,不需要为函数的参数声明类型,因为编译器会从传入的值推断出参数的类型。
One big advantage of type-inferred systems is that you don't need to declare the types of arguments to a function because the compiler infers them from the parameters you pass in.
Objective Caml:OCaml是组合了静态类型和隐式类型的Lisp的衍生物,它在不牺牲生产率的情况下提供了高性能。
Objective Caml: OCaml, a Lisp derivative that combines static and inferred typing to deliver high performance without sacrificing productivity.
因为对于阅读你代码的人来说它们是不明显的,这种类型的对于特定实现的隐式耦合特别有害。
Those types of implicit coupling to a specific implementation are particularly pernicious because they aren't obvious to a reader of your code.
通过前面所描述的机制,可以为键不安全的内核扩展授予广泛的数据访问权限,这种机制是一种保护门类型,我们将其称为隐式保护门。
The mechanism described earlier that grants broad data access rights to a key-unsafe kernel extension is a type of protection gate called an implicit protection gate.
CLOB数据类型的代码页自然地等于数据库代码页,所以在串行化期间对SQL的回复有一个隐式的代码页转换。
CLOB data types have an inherent code page equal to the database code page, so there is an implicit code page conversion of the reply to the SQL world during the serialization.
DB 2 9.7现在支持隐式的数据类型强制转换。
假如您要将上面两个示例建模为隐式header;对于简单类型Header,其在业务对象编辑器中建模的情况如图2中所示。
Imagine if you model the two examples above as implicit headers; for the simple type header this would be modelled in the business object editor, as shown in Figure 2.
请注意如何通过更改在query调用中传递的Predicate来更改隐式选择的类型条件,如清单8所示?
Notice how changing the type of the Predicate passed in the query call can change the type criteria implicitly selected, shown in Listing 8.
隐式切换仍在继续执行,但是它针对对象src的类型进行。
There is still an implicit switch going on, but it is on the type of the object SRC.
另外,hardeep被隐式转换为xml类型(xs:string)。
隐式转换操作符将Point类型转换为int。
The implicit conversion operator is defined, which converts a Point type to int.
它可以让编译器隐式地将一种类型转换成另一种类型。
It allows types to be implicitly converted to another type by the compiler.
有些形式的规则在模型中的业务类型定义中是隐式的,它们出现在被建模领域的业务类型的UML和实体关系(ER)模型中。
Certain forms of rules are implicit in the definition of the business types in the model, and manifest in UML and entity relationship (er) models of the business types of the modeled domain.
可以声明一个新的NAMESPACE常量,这隐式声明了一个字符数据类型的常量。
You can declare a new NAMESPACE constant, which is implicitly made a constant and from the character data type.
虽然双引号隐式地把数据类型定义为字符串,但是以上方法显式地把concat 2函数的输入和输出类型定义为字符串。
Though the double quotes implicitly types data as strings, the above method explicitly types both the input and output to the concat2 function as strings.
隐式地把String对象类型转换成object类型(用于参数列表)。
It implicitly casts the String object type to an object type (for the parameter list).
Python中既有强制类型转换也有强迫同型,通常使用更多的是前者(“显式优于隐式”)。
Python contains a mixture of casts and coercions, with a usual preference for the former (" explicit is better than implicit ").
predicate_result对象有一个隐式的构造函数,它接受一个boolean值,因此即使validate_list的期望类型和实际返回类型不同,代码仍然会正常运行。
The predicate_result object has an implicit constructor that accepts a Boolean value, which explains why the code works fine even though the expected and actual return types of validate_list differ.
predicate_result对象有一个隐式的构造函数,它接受一个boolean值,因此即使validate_list的期望类型和实际返回类型不同,代码仍然会正常运行。
The predicate_result object has an implicit constructor that accepts a Boolean value, which explains why the code works fine even though the expected and actual return types of validate_list differ.
应用推荐