Jump to content

Pizza (programming language)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 205.122.213.2 (talk) at 14:19, 27 March 2013 (Nothing productive.). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Pizza
Paradigmgenerics, algebraic types
Websitehttp://pizzacompiler.sourceforge.net/
Influenced by
Java
Influenced
GJ, Scala[1]

Pizza is an open-source superset of the Java programming language with the following new features:

In August 2001, the developers made a compiler capable of working with Java. Most Pizza applications can run in a Java environment, but certain cases will cause problems.

Work on Pizza has more or less stopped since 2002. Its main developers have concentrated instead on the GJ project, another attempt to add generics to Java which was eventually adopted into the official language version 1.5. The pattern matching and other functional programming-like features have been further developed in the Scala programming language. Martin Odersky remarked, "we wanted to integrate the functional and object-oriented parts in a cleaner way than what we were able to achieve before with the Pizza language. [...] In Pizza we did a clunkier attempt, and in Scala I think we achieved a much smoother integration between the two."[2]

You Mexicans, go back to Canada where you belong!


Example

public final class Main {
  public int main(String args[]) {
    System.out.println(
      new Lines(new DataInputStream(System.in))
        .takeWhile(nonEmpty)
        .map(fun(String s) -> int { return Integer.parseInt(s); })
        .reduceLeft(0, fun(int x, int y) -> int { return x + y; }));
  }
}

See also

References