From CaesarJ Homepage

Caesar: ReleaseNotes060

< Back

Release Notes v0.6.0

What's new?

The major addition in this version is the implementation of the family type checker. Note that 0.6.0 is an experimental version that still requires some fine tuning, hence if you require a more stable version of Caesar, please consider using the 0.5.3.

Family Polymorphism

Virtual types can be annotated with a path expression to the enclosing family. In order to be able to statically type-check the family, each element of the expression has to be final.

For example:
 
final Graph g1 = new Graph();
final Graph g2 = new Graph();
g1.Node n = g1.new Node();
g2.Node n = g1.new Node(); // type-checker error

Dependent types can be declared whereever a plain Java type declaration would be valid (In cclass-es as well as in plain Java classes). In the following a few examples:

As field:
 
public class A {
    public final Graph g = new Graph();
    public g.N n = g.new N();
}

In method signatures:
 
public class A {
    public final Graph g = new Graph();
    public m1(g.N n) {...}
    public g.N m2() {...}
    public void m3(final Graph someOtherGraph, someOtherGraph.N n1, g.N n2) {...}
}

For more information on the semantics of dependent types please refer to the language specification.

Have a lot of fun experimenting with the new type checker and feel free to send us your feedback.

Known limitations

Retrieved from http://caesarj.org/index.php/Caesar/ReleaseNotes060
Page last modified on March 21, 2005, at 01:47 PM