Jump to content

Pizza (programming language): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
fix link
Made the English more idiomatic; updated referenced version to reflect the official renumbering of Java 1.5 to 5, adding link to the relevant section of the Java version history article.
Line 19: Line 19:
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.
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 [[Generic Java]] 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]].
Work on Pizza more or less stopped in 2002.{{cn}} Its main developers turned their focus afterwards to the [[Generic Java]] project: another attempt to add generics to Java that was officially adopted as of
[[Java_version_history#J2SE_5.0|version 5]] of the language. 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 programming|functional]] and [[Object-oriented programming|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."<ref>[http://www.artima.com/scalazine/articles/goals_of_scala.html The Goals of Scala's Design]</ref>
[[Martin Odersky]] remarked, "we wanted to integrate the [[Functional programming|functional]] and [[Object-oriented programming|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."<ref>[http://www.artima.com/scalazine/articles/goals_of_scala.html The Goals of Scala's Design]</ref>



Revision as of 21:11, 20 March 2020

Pizza
Paradigmgenerics, algebraic types
Websitepizzacompiler.sourceforge.net
Influenced by
Java
Influenced
Generic Java, Scala[1]

Pizza is an open-source superset of Java 1.4, prior to the introduction of generics for the Java programming language. In addition to its own solution for adding generics to the language, Pizza also added function pointers and algebraic types with case classes and pattern matching.

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 more or less stopped in 2002.[citation needed] Its main developers turned their focus afterwards to the Generic Java project: another attempt to add generics to Java that was officially adopted as of version 5 of the language. 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]

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; }));
        while(x == 0) { map.create.newInstance() }
  }
}

References