*** Welcome to piglix ***

Type inference


Type inference refers to the automatic deduction of the data type of an expression in a programming language. If some, but not all, type annotations are already present, it is termed type reconstruction.

It is a feature present in some strongly statically typed languages. It is often characteristic of functional programming languages in general. Some languages that include type inference include C++11, C# (starting with version 3.0), Clean, D, F#, FreeBASIC, Go, Haskell, ML, Nim, OCaml, Opa, RPython, Rust, Scala, Swift, and Visual Basic (starting with version 9.0). The ability to infer types automatically makes many programming tasks easier, leaving the programmer free to omit type annotations while still permitting type checking.


...
Wikipedia

...