Next: Introduction
Up: Lucent Software Symposium
A slice of Pizza:
A quick introduction to Pizza, a dialect of Java
Martin Odersky
University of Southern Australia
- Philip Wadler
Lucent Technologies
10 October 1997
Abstract:
Pizza is a superset of Java that incorporates four additional features.
- Parametric polymorphism : the ability to parameterize classes
over types, similar to (but safer than) templates in C++.
- Higher-order functions : the ability to treat functions as values,
similar to inner classes in Java 1.1, but more convenient and more efficient.
- Algebraic data types : a convenient way of representing trees with
support for pattern matching, providing advantages similar to the
well-known `Composition' and `Visitor' design patterns.
- Tail calls : don't grow the stack when the last operation
in one methods is to call another method; this enables one to replace
iteration by recursion, and makes it easy to simulate finite-state
machines.
Pizza contains Java as a subset, interworks smoothly with Java, and
compiles into the Java Virtual Machine (JVM): so it runs wherever Java
runs, including web browsers. Pizza is freely available from the
Pizza website.
The Pizza compiler can be used to translate Pizza into Java or to
generate JVM code directly; it runs faster than Sun's own javac
compiler.
Next: Introduction
Up: Lucent Software Symposium
Philip Wadler