在类型推断的情况下,编译器会根据上下文推断值的类型。
In type inference, the compiler infers the types of values based on the context.
该决策使语言更加一致、使实现更加易于维护以及提供更多机会以便充分利用将来在类型推断中的改进。
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.
在大多数情况下,方法的返回类型可以被推断,所以“:”和返回类型可以被省略。
In most cases, the return type of the method can be inferred, so the ':' and return type can be omitted.
类型推断使得显式的类型声明信息在大多数场合下减少到了最低。
Type inference minimizes the need for explicit type information in many contexts.
Haskell会做一些类型推断,这意味着它会根据程序中的语义线索来推断元素的类型,所以您会看到我在使用有些函数时没有声明相关的类型。
Haskell does some type inference, meaning it infers the types of elements from syntactic clues in a program, so you'll see me use some functions without declaring associated types.
范型类型Map的类型参数在map被创建时被推断为[Nothing, Nothing]。
The type parameters of the generic type Map were inferred as [Nothing,Nothing] when the map was created.
在某些情况下,不可能推断模板实参的类型。
In some situations, it is not possible to deduce the types of the template arguments.
在使用向上转换运算符时,编译器会尝试根据上下文来推断出要转换为的类型。
When you use the upcast operator, the compiler attempts to infer the type you are converting to from the context.
目的采用有限元方法,预测寰椎在不同位置条件下寰椎应力的分布,并以此推断可能出现的寰椎骨折类型。
Objective to predict the stress distribution of atlas under different pre-trauma postures by finite element method, and to deduce the sites of atlas fracture accordingly.
目的采用有限元方法,预测寰椎在不同位置条件下寰椎应力的分布,并以此推断可能出现的寰椎骨折类型。
Objective to predict the stress distribution of atlas under different pre-trauma postures by finite element method, and to deduce the sites of atlas fracture accordingly.
应用推荐