new T[] in a polymorphic function. This is usefull to write the map function of arrays for instance.
String is the type of non-null strings, while ?String is the type of possibly null strings. This is good for making the interface of methods explicit (does it accept null arguments?) and ensures that no NullPointerException occurs at runtime.
public boolean contains(A x)
{
return ((Object)elem).equals((Object)x) ||
rest.contains(x);
}
is written in Nice
boolean contains(A x)
{
return elem.equals(x) || rest.contains(x);
}
or even, still in Nice
boolean contains(A x) = elem.equals(x) || rest.contains(x);
InputStream. You can also tell the compiler to write the bytecode or the pizza->java code in an OutputStream. So the compiler is not strictly file oriented and the Application that embeds the pizzcompiler does not need the use the filesystem. You give Pizza a Collection of InputStream and you get a Collection of OutputStream containing the bytecode.
| Topic NiceVersusPizza . { Edit | Attach | Ref-By | Printable | Diffs | r1.3 | > | r1.2 | > | r1.1 | More } |
|
Revision r1.3 - 23 May 2003 - 13:01 GMT - DanielBonniot Parents: WebHome > LanguageComparisons |
Copyright © 1999-2003 by the contributing authors.
All material on this collaboration platform is the property of the contributing authors. Ideas, requests, problems regarding TWiki? Send feedback. |