Top "Type-inference" questions

Type inference is the process of inferring types for programs automatically, using rules defined by a type system.

Does Java 10 provide a val keyword? If not, why not?

Java 10 brings a C#-like var keyword for local type-inference. But does Java 10 also provide a val keyword, as is …

java type-inference java-10
What makes Haskell's type system more "powerful" than other languages' type systems?

Reading Disadvantages of Scala type system versus Haskell?, I have to ask: what is it, specifically, that makes Haskell's type …

haskell types type-inference type-systems hindley-milner
implementing type inference

I see some interesting discussions here about static vs. dynamic typing. I generally prefer static typing, due to compile type …

compiler-construction functional-programming language-design type-inference
Self.Type cannot be directly converted to AnyClass in extension to objective-c class in swift

I'm trying to create fabric method to create UIViewController with correct nib name (to fix iOS8 default initialiser issue). To …

ios objective-c swift type-inference swift-extensions
How to show inferred TypeScript type in WebStorm?

In VS2012, you can hover over a typescript variable and it will show you the inferred type. Is there a …

typescript phpstorm webstorm type-inference
JDK 11.0.2 compilation fails with javac NPE on anonymous parameterized class type inference

Code (spring-web 5.1.2) public static void main(String[] args) { RestTemplate restTemplate = new RestTemplate(); HttpHeaders headers = new HttpHeaders(); headers.set(HttpHeaders.AUTHORIZATION, "…

java javac type-inference java-11 compiler-bug
Why diamond operator is used for Type Inference in Java 7?

List<String> list = new ArrayList(); will result in compiler warning. However the following example compiles without any warning: …

java java-7 type-inference diamond-operator
C# 3.0 generic type inference - passing a delegate as a function parameter

I am wondering why the C# 3.0 compiler is unable to infer the type of a method when it is passed …

c# generics delegates c#-3.0 type-inference
How good is the C# type inference?

How good is C# type inference? I read somewhere that it's only for local variables? Does it work for class …

c# .net type-inference
Why can't diamond infer types on anonymous inner classes?

In Java 7 and later, diamond can be used to infer types on normally like so without an issue: List<…

java java-7 type-inference