The Pizza Compiler

The Pizza language is an extension to Java with three new features:
- Generics (aka Parametric polymorphism)
- Function pointers (aka First-class functions)
- Class cases and pattern matching (aka Algebraic types)

Pizza's Language FAQ

 

 

 

How can I define a named first-class function?

  You can define a mutable variable of function type as follows:
(String)->int len = fun (String s)->int {return s.length(); };
Alternatively, you can also define a method and use the method's name without the (...) parentheses.
Would it be possible to make the case-classes into fully functional inner classes, with different initializers and so forth?   This idea is somewhat at odds with the intended ``closed-sum'' semantics of this feature.
"private protected" does not work.   The private protected modifier has been abolished in Java 1.0. javac still supports it, but other compilers and the language specification don't. We suggest using default visibility instead.