改进对通用实例创建的类型推断。
类型推断对方法也有用。
相反,使用类型推断,编译器可以自己处理。
Instead, the compiler could figure it out for itself using type inference.
它不需要在运行时做类型推断?
捕获助手技巧涉及多个因素:类型推断和捕获转换。
The capture-helper trick depends on several things: type inference and capture conversion.
什么是模板函数挥发性类型推断错了吗?
What is wrong with a volatile type deduction in template functions?
类型推断选择了一个满足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.
Diamond功能使用类型推断计算出赋值右侧的类型参数,并允许将前面的示例重新编写为
The diamond feature uses type inference to figure out the type parameters on the right side of the assignment, allowing the preceding example to be rewritten as
我谨慎地将这种类型推断设成可选的功能,认为如果将其作为所有处理工具链条的基础可能是危险的。
I am careful to make this type inference optional, and I think it's probably dangerous to use it as a cornerstone of any processing tool chain.
许多开发者发现静态语言太过冗长,抱怨静态类型是冗长的元凶,而事实上真正的原因是缺少类型推断。
Many developers who find static languages too verbose often blame static typing for the verbosity when the real problem is a lack of type inference.
该决策使语言更加一致、使实现更加易于维护以及提供更多机会以便充分利用将来在类型推断中的改进。
That decision makes the language more consistent, makes the implementation more maintainable, and offers more opportunities to take advantage of future improvements in type inference.
该决策使语言更加一致、使实现更加易于维护以及提供更多机会以便充分利用将来在类型推断中的改进。
That decision makes the language more consistent, makes the implementation more maintainable, and offers more opportunities to take advantage of future improvements in type inference.
应用推荐