Previous article

Next article


Just: safe unknown types in Java-like languages

Giovanni Lagorio, DISI, University of Genova, Italy
Elena Zucca, DISI, University of Genova, Italy

space REFEREED
ARTICLE


PDF Icon
PDF Version

Abstract

Most mainstream object-oriented languages, like C++, Java and C#, are statically typed. In recent years, untyped languages, in particular scripting languages for the web, have gained a lot of popularity notwithstanding the fact that the advantages of static typing, such as earlier detection of errors, are widely accepted. We think that one of the main reasons for their widespread adoption is that, in many situations, the ability of ignoring types can be handy to write simpler and more readable code.

We propose an extension of Java-like languages which allows developers to forget about typing in strategic places of their programs without losing type-safety. That is, we allow programmers to write simpler code without sacrificing the advantages of static typing. This is achieved by means of inferred type constraints. These constraints describe the implicit requirements on untyped code to be correctly invoked.

This flexibility comes at a cost: field accesses and method invocations on objects of unknown types are less efficient than regular field accesses and method invocations. Also, our type system is currently more restrictive than it should be; its extension is the subject of ongoing work.

We have implemented our approach on a small, yet significant, Java subset.


Note: Due to the typographical sophistication of this article, no HTML version is available. Please use the PDF version.

About the author



  Giovanni Lagorio took a Ph.D. in Computer Science at the University of Genova on May 2004. His research interests are in the area of programming languages; in particular, design and foundations of modular and object-oriented languages and systems. He can be reached at lagorio@disi.unige.it. See also http://www.disi.unige.it/person/LagorioG/.






Elena Zucca Associate professor at the University of Genova since 1999, previously assistant professor at the University of Genova since 1989. Author of more than 40 papers in international journals and conferences. Her main research contributions are in the semantics and specification of concurrent and object-oriented languages, extension of algebraic techniques to dynamic systems, module calculi, type systems and semantics of Java-like languages. She can be reached at zucca@disi.unige.it. See also http://www.disi.unige.it/person/ZuccaE/.


Cite this article as follows: Giovanni Lagorio and Elena Zucca: "Just: safe unknown types in Java-like languages", in Journal of Object Technology, vol. 6, no. 2, Special Issue OOPS Track at SAC 2006, February 2007, pp. 69-98 http://www.jot.fm/issues/issue_2007_02/article4.

 


Previous article

Next article