type inference

noun
UK /ˈtaɪp ɪnˌfərəns/
US /ˈtaɪp ɪnˌfɜːrəns/

Type inference is when a computer figures out what kind of information something is all by itself.

Thanks to type inference, I didn't have to tell the program that the number 5 is a number.


OTHER MEANINGS

2. The process by which a compiler determines the data type of an expression without explicit annotations.

The compiler uses type inference to deduce that the result is an integer.

3. A feature in some programming languages that lets you omit type declarations for local variables.

With type inference, writing 'let x = 10' is enough for the language to know x is a number.

4. In logic and linguistics, the automatic assignment of types to expressions based on context.

Type inference in the lambda calculus helps determine the type of a function from its body.