Javari Language

Presented at OopslaOhFive

Javari http://pag.csail.mit.edu/javari/

Very cool thing. It adds C++ like const modifiers, only much betters to Java language. Unlike other language research this is very limited in scope and quite possibly not a far fetch to be "mixed-in" next versions of Java (or C# for that matter).

  class Account {
    /* this-mutable */ Account peer;
    final int x;
    assignable doesntMatter;
    readonly int 

readonly Account getPeer() { return }

The readonly properties will do a transitive-closure to the object graph, so that it cannot be subverted through calls like composite.getPart().modifyStateOfThePart(). This is a complain I had a long time about java, that they dropped the const keyword from C++, Javari's concepts are that and much more .

MichaelErnst? presented a paper about JavariLanguage at OopslaOhFour, by the way.

Ernst's paper on Javari at OopslaOhFour is an earlier proposal that includes only the readonly keyword. The OopslaOhFive paper adds mechanisms to control assignability and also to deal with generic types more effectively.


Instead of AddingEpicycles, why don't they give every object a .freeze and .thaw method, so you control its constancy at the object's interface, not at the interface of its containing object?

Because that is something else entirely. .freeze and .thaw are dynamic, whereas these are statically checked and enfored (for some TypesMatter?).


EditText of this page (last edited October 24, 2005) or FindPage with title or text search