Typeless programming in Java 5.0

  • Authors:
  • Martin Plümicke;Jörg Bäuerle

  • Affiliations:
  • University of Cooperative Education Stuttgart, Florianstraße, Horb;AWM Media, Worthing, UK

  • Venue:
  • PPPJ '06 Proceedings of the 4th international symposium on Principles and practice of programming in Java
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

With the introduction of Java 5.0 [9] the type system has been extended by parameterized types, type variables, type terms, and wildcards. As a result very complex types can arise. The termVectoris for example a correct type in Java 5.0.Considering all that, it is often rather difficult for a programmer to recognize whether such a complex type is the correct one for a given method or not. Furthermore there are methods whose principle types would be intersection types. But intersection types are not implemented in Java 5.0. This means that Java 5.0 methods often don't have the principle type which is contradictive to the OOP-Principle of writing re-usable code.This has caused us to develop a Java 5.0 type inference system which assists the programmer by calculating types automatically. This type inference system allows us, to declare method parameters and local variables without type annotations. The type inference algorithm calculates the appropriate and principle types.We implement the algorithm in Java using the observer design pattern.