CSE341 -- Language extensions

We would like to you to read about some recent directions in language design. One of the common themes is merging features from functional languages and object-oriented languages, in order to gain the strengths of both. For this reading assignment, you'll be reading excerpts from two recent research papers.

1: Pizza

Pizza augments Java with three features from functional languages:

Please read sections 1-4 and the conclusion from the Pizza paper, available in the following formats (you will probably want to print out a copy to read offline):

[ Pizza paper: PDF (Acrobat) ]

Pay particular attention during the introduction---it's a great example of applying "big picture" language design principles to improving a particular language. Also, you should probably put off reading sections 2.1 and 2.2 until next week, after we've talked about bounded polymorphism and static OO type checking in lecture.

Incidentally, Pizza is of particular interest to Java fans because its parameterized types were the basis for GJ, or "Generic Java"---a more modest language extension that will probably be incorporated into the next major release of the Java language. See below for further reading on GJ.

2: EML

EML is an object-oriented extension to ML that we are currently developing in the Cecil group at UW. Please look at sections 1 to 3.2, inclusive, of the draft EML paper (only accessible from UW-CSE machines):

[ EML draft paper : PDF (Acrobat) ]

The best way for you to read this paper is probably:

  1. Skim the introduction.
  2. Next, skip to the examples and see how classes and inheritance look in EML.
  3. Go back and reread the text of section 2 and 3.

You do not have to spend as much time on this paper as on the Pizza paper, but you should read enough to get a flavor of how EML extends ML with inheritance. Notice how the syntax for declaring a class with multiple subclasses resembles the ML syntax for datatypes with multiple constructors. Also, notice how "pattern matching" and "dispatching a method on runtime receivers" are really the same thing, if you look at it the right way.

3: Further reading

The following reading is not required, but is provided here for those who are curious about other recent language design research.

GJ: Generic Java

I mentioned above that GJ, in some form, will be in the next major revision of Java. If you didn't get enough understanding of parameterized types from the Pizza paper, you might want to read one of the following papers on just GJ:

GJ: Extending the Java Programming Language with Type Parameters
A slow-paced tutorial introduction to parametric polymorphism in GJ, with plenty of extended examples.
Making the future safe for the past: Adding Genericity to the Java Programming Language
A paper that covers GJ from a language designer's standpoint. This can also serve as a more extended discussion of the "homogeneous translation" of Pizza parametric polymorphism.

MultiJava

In a very different language design direction, MultiJava (developed here at UW) extends Java with statically typechecked open classes and multiple dispatch:

MultiJava achieves all this without giving up Java's strong, static, modular ("class by class") type checking. The MultiJava paper is more challenging than the others mentioned on this page, but you should still be able to understand it:

[ MultiJava paper: PDF (Acrobat) | ps.gz ]


Keunwoo Lee
Last modified: Fri May 25 11:36:13 PDT 2001