改进对通用实例创建的类型推断。
另一个示例:通用类型推断。
类型推断——包括精确和推测两种方式。
类型推断对方法也有用。
相反,使用类型推断,编译器可以自己处理。
Instead, the compiler could figure it out for itself using type inference.
即使使用类型推断,还是需要多余的类型信息。
Even with type inference, redundant type information is needed.
它不需要在运行时做类型推断?
怎么是这个函数的类型推断?
捕获助手技巧涉及多个因素:类型推断和捕获转换。
The capture-helper trick depends on several things: type inference and capture conversion.
什么是模板函数挥发性类型推断错了吗?
What is wrong with a volatile type deduction in template functions?
其中一些,比如已经讨论过的类型推断,可以随意使用。
Some of these, such as type inference, as discussed, come for free.
类型推断选择了一个满足if表达式所有结果的类型。
The type inference picks a type that works for all outcomes of the if expression.
Xbase是静态类型的,支持泛型、闭包与类型推断。
Xbase is statically types, supports generics... and closures and type inferences.
在类型推断的情况下,编译器会根据上下文推断值的类型。
In type inference, the compiler infers the types of values based on the context.
如果函数不依赖于特定类型,则将类型推断为泛型。
类型推断使得显式的类型声明信息在大多数场合下减少到了最低。
Type inference minimizes the need for explicit type information in many contexts.
VisualBasic10为数组初始化增加了类型推断。
Visual Basic 10 adds type inference for initialization arrays.
最终我们选择了复杂算法,因为其更类似于语言中其他地方的类型推断行为。
Eventually we chose the complex algorithm because it is more similar to the behavior of type inference elsewhere in the language.
若是变量的声明和赋值不在同一行书写的话,编译器将不允许我们使用类型推断。
Type inference is not allowed in cases where the variable is not assigned a value on the same line it is declared.
虽然看上去不错,不过添加类型推断却不只是为了提高开发者的那么一点点输入速度。
While nice to have, type inference was not added just to make typing a bit faster.
类型推断帮助你自动推断类型签名,所以用户不用人工提供一般的类型信息。
Type inference helps by automatically inferring type signatures, so that the user doesn't have to provide trivial type information manually.
从根本上讲,类型推断是约束解决技术,往往对使用哪些约束开始具有多个合理的选择。
Fundamentally, type inference is a constraint-solving technique, and there are often multiple reasonable choices for which constraints to start with.
有了类型推断,编译器可以通过强制解决计算出变量类型,而不是使程序员明确声明它们。
With type inference, the compiler figures out the types of variables based on constraint solving, rather than making the programmer declare them explicitly.
使用OCaml时,静态类型导致的开销很小,因为这种语言是类型推断式的。
With OCaml, you pay minimal overhead for your static typing because the language is type inferred.
由于动态语言几乎都是类型推断式的,所以您不需要花多大力气来表达基本思想。
Because dynamic languages are almost always type inferred, you don't need to work as hard to express basic ideas.
类型推断—使用匿名类型时,关键字var必不可少。它还能减少你其他变量声明中的冗余。
Type Inference - the var keyword, which is necessary when using anonymous types, can also reduce redundancy in your other variable declarations.
这是一个原型,用来展现以一种类ruby语言而不是一种新语言来实现类型推断的可能性。
It's a prototype that shows the possibilities of type inference in a Ruby-like language, rather than a new language for programmers to use.
由JeremyManson提交,该建议提出增加对类实例创建表达式的有限类型推断。
Submitted by Jeremy Manson, this proposal addresses the addition of limited type inference for class instance creation expressions. For example instead of writing.
飞镖vm的生产模式时,忽略了静态类型是怎样的?它不需要在运行时做类型推断?
How is dart VM's production mode faster when ignoring static types? Doesn't it need to do type inference at runtime?
捕获转换允许编译器为已捕获的通配符产生一个占位符类型名,以便对它进行类型推断。
Capture conversion is what allows the compiler to manufacture a placeholder type name for the captured wildcard, so that type inference can infer it to be that type.
应用推荐