Download now Free registration required
Java's static type system protects against certain runtime errors, but is often unwieldy and repetitive. Type inference gives the benefits of strong typing, without the burden of traditional static typing. The authors consider the local type inference problem, where fields and parameter/return types are given, but local variable types are inferred. They have designed and implemented Mocha, a Java language extension providing type inference, and they formalise a subset of it here. Mocha differs from other languages using type inference, such as Scala, C# 3.0 and OCaml, since variables can have different types at different program points.
- Format: PDF
- Size: 104.41 KB