Local Inference

Back to Type Inference

Type inference limited to local contexts, typically through var/auto keywords that let the compiler deduce the type from the initializer expression. Simpler than full Hindley-Milner but still reduces annotation burden.

Key Properties

  • Languages: Java (var), C++ (auto), Kotlin (val/var)

type-systems type-inference local