Type Inference

Type inference refers to the automatic deduction of the type of an expression in a programming language. If some, but not all, type annotations are already present it is referred to as type reconstruction. The opposite operation of type inference is called type erasure.

It is a feature present in some strongly statically typed languages. It is often characteristic of, but not limited to, functional programming languages in general. Some languages that include type inference are ML, OCaml, Haskell, Scala, D, Clean, Opa and Go. It has lately been added (to some extent) to Visual Basic (starting with version 9.0), C# (starting with version 3.0) and C++11. It is also planned for Perl 6. The ability to infer types automatically makes many programming tasks easier, leaving the programmer free to omit type annotations while still permitting type checking.

Read more about Type Inference:  Nontechnical Explanation, Technical Description, Example, Hindley–Milner Type Inference Algorithm

Famous quotes containing the words type and/or inference:

    “... In truth I find it ridiculous that a man of his intelligence suffer over this type of person, who is not even interesting, for she is said to be foolish”, she added with all the wisdom of people who are not in love, who find that a sensible man should only be unhappy over a person who is worthwhile; it is almost tantamount to being surprised that anyone deign having cholera for having been infected with a creature as small as the vibrio bacilla.
    Marcel Proust (1871–1922)

    I shouldn’t want you to be surprised, or to draw any particular inference from my making speeches, or not making speeches, out there. I don’t recall any candidate for President that ever injured himself very much by not talking.
    Calvin Coolidge (1872–1933)