Pizza is a programming language created in 2001.
#597on PLDB | 22Years Old |
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. Read more on Wikipedia...
class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello World");
}
}
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() }
}
}
Feature | Supported | Token | Example |
---|---|---|---|
Strings | β | " | "Hello world" |
Print() Debugging | β | System.out.println | |
Scientific Notation | β | ||
Binary Literals | β | // 0[bB][01][01_]*[lL]? |
|
Integers | β | // 0|[1-9][0-9_]*[lL]? |
|
Floats | β | // ([0-9][0-9_]*\.([0-9][0-9_]*)?|\.[0-9][0-9_]*)([eE][+\-]?[0-9][0-9_]*)?[fFdD]?|[0-9][eE][+\-]?[0-9][0-9_]*[fFdD]?|[0-9]([eE][+\-]?[0-9][0-9_]*)?[fFdD]|0[xX]([0-9a-fA-F][0-9a-fA-F_]*\.?|([0-9a-fA-F][0-9a-fA-F_]*)?\.[0-9a-fA-F][0-9a-fA-F_]*)[pP][+\-]?[0-9][0-9_]*[fFdD]? |
|
Hexadecimals | β | // 0[xX][0-9a-fA-F][0-9a-fA-F_]*[lL]? |
|
Octals | β | // 0[0-7_]+[lL]? |
|
Conditionals | β | ||
Inheritance | β | ||
Access Modifiers | β | ||
Switch Statements | β | ||
Exceptions | β | ||
Constants | β | ||
Classes | β | ||
While Loops | β | ||
Booleans | β | ||
Case Sensitivity | β | ||
MultiLine Comments | β | /* A comment */ |
|
Threads | β | ||
Line Comments | β | // A comment |
|
Increment and decrement operators | β | ||
Module Pattern | β | // Package = directory. Java classes can be grouped together in packages. A package name is the same as the directory (folder) name which contains the .java files. You declare packages when you define your Java program, and you name the packages you want to use from other libraries in an import statement. // The first statement, other than comments, in a Java source file, must be the package declaration. // Following the optional package declaration, you can have import statements, which allow you to specify classes from other packages that can be referenced without qualifying them with their package. // This source file must be Drawing.java in the illustration directory. package illustration; import java.awt.*; public class Drawing { // ... } |
|
Zero-based numbering | β | ||
Iterators | β | Iterator iter = list.iterator(); //Iterator |
|
Interfaces | β | interface MyInterface{ /* This is a default method so we need not * to implement this method in the implementation * classes */ default void newMethod(){ System.out.println("Newly added default method"); } /* Already existing public and abstract method * We must need to implement this method in * implementation classes. */ void existingMethod(String str); } public class Example implements MyInterface{ // implementing abstract method public void existingMethod(String str){ System.out.println("String is: "+str); } public static void main(String[] args) { Example obj = new Example(); //calling the default method of interface obj.newMethod(); //calling the abstract method of interface obj.existingMethod("Java 8 is easy to learn"); } } |
|
File Imports | β | import javax.swing.*; import javax.swing.JOptionPane; // use fully qualified name without import: javax.swing.JOptionPane.showMessageDialog(null, "Hi"); // There are 166 packages containing 3279 classes and interfaces in Java 5. // import java.io.*; Input-output classes. |
|
Garbage Collection | β | ||
Constructors | β | ||
Comments | β | ||
Single Dispatch | β | ||
Generics | β | List |
|
Assert Statements | β | // By default, assertions are disabled // java βenableassertions Test int score = 10; assert score >= 10 : " Below"; System.out.println("score is "+score); |
|
Case Insensitive Identifiers | X | ||
Semantic Indentation | X | ||
Operator Overloading | X | ||
Macros | X | ||
Pointers | X | ||
Variable Substitution Syntax | X | ||
S-Expressions | X |