您在使用显式类型构造函数时需要进行权衡。
You'll need to evaluate the tradeoffs in using an explicit type constructor.
另一个问题在于对隐式类型的使用。
显式类型语言要求声明每个变量和每个函数参数。
A manifestly typed language forces you to declare each variable and each function argument.
很多喜欢静态类型的人更偏爱隐式类型。
为什么不能一个隐式类型变量被声明在类级别吗?
Why cannot an implicitly typed variable be declared at class level?
这里有一份关于scala何时需要显式类型注解规则的总结。
Here is a summary of the rules for when explicit type annotations are required in Scala.
本文旨在探究直言式类型英语广告的主位及主述位推进模式。
The paper tries to explore the theme and thematic development patterns in English advertisements of the straight-line type.
没有显式类型参数时,会使用类型推理来确定函数的参数类型。
When there are no explicit type parameters, type inference is used to determine the types of parameters of functions.
而隐式类型语言则根据语言中的语法和结构线索来确定对象的类型。
A type-inferred language determines which type an object might be based on syntactic or structural clues in the language.
Scala使用类型注解作为显式类型声明的方式,比如HashMap。
Scala USES the term type annotations for explicit type declarations like HashMap.
故名思意,“隐式类型局部变量”将无法用于域变量或常量的声明中,否则将导致编译错误。
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.
此程序还演示了静态字段初始值设定项如何在显式类型构造函数中的代码之前执行。
This program also demonstrates how static field initializers execute before the code inside an explicit type constructor.
斜拉桥与桁架和梁式类型桥之间,在结构上的一个最显著不同之处,在于柔度方面。
One of the most noticeable structrual differences between the cable-stayed bridge and the truss and girder types lies in the field of flexibility .
请注意,在上一个示例中,没有在初始化语句的左侧对隐式类型的数组使用方括号。
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.
正如您在前面看到的那样,静态字段初始值设定项的代码在隐式类型构造函数的内部执行。
As you saw earlier, the code for a static field initializer executes inside an implicit type constructor.
变量的显式类型化(即将变量声明为String或Collection)依然是可选的。
Explicit typing of variables (that is, declaring a variable as a String or Collection) is still optional.
不同的表中相似的列应该声明为相同的类型,这样就可以不使用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.
这个异常是由显式类型转换抛出的,因为测试用例试图把类型为String 的东西转换成Integer。
The exception is thrown by the explicit cast because the test case is trying to convert something of type String to an Integer.
用这些语言写出的代码需要比Scala更少的类型注解,因为Scala的类型推断算法得同时支持面向对象类型和函数式类型。
Code written in these languages require type annotations less often than in Scala, because Scala's type inference algorithm has to support object-oriented typing as well as functional typing.
Objective Caml:OCaml是组合了静态类型和隐式类型的Lisp的衍生物,它在不牺牲生产率的情况下提供了高性能。
Objective Caml: OCaml, a Lisp derivative that combines static and inferred typing to deliver high performance without sacrificing productivity.
当存在显式类型构造函数时,编译器不会用beforefieldinit标记该类型,精确的计时限制会导致FxCop所暗示的性能下降。
When an explicit type constructor is present, the compilers will not mark the type with beforefieldinit, and the precise timing restrictions lead to the performance drop hinted at by FxCop.
递归方法也需要显式的返回类型。
重载的方法有时候也需要显式返回类型。
Overloaded methods can sometimes require an explicit return type.
请注意,有三种度量类型:非附加式、附加式和半附加式。
Note: There are three measure types: Non-additive, additive, and Semi-additive.
由于动态语言几乎都是类型推断式的,所以您不需要花多大力气来表达基本思想。
Because dynamic languages are almost always type inferred, you don't need to work as hard to express basic ideas.
由于动态语言几乎都是类型推断式的,所以您不需要花多大力气来表达基本思想。
Because dynamic languages are almost always type inferred, you don't need to work as hard to express basic ideas.
应用推荐