next up previous
Next: Concluding remarks Up: Issues in the language Previous: Datatypes in HPJava

Programming convenience

The language provides some special syntax for the programmer's convenience. Unlike the syntax for data declaration, which has fundamental significance in the programming model, these extensions are purely provide syntactic conveniences.

There are a limited number of Java operators overloaded. A group object can be restricted by a location using the / operation, and a sub-range or location can be obtained from a range using the [ ] operator enclosing a triplet expression or an integer, These pieces of syntax can be considered as shorthand for suitable constructors in the corresponding classes. This is comparable to the way Java provides special syntax support for String class constructor.

Another kind of overloading occurs in location shift, which is used to support ghost regions. A shift operator + is defined between a location and an integer. It will be illustrated in the examples in the next section. This is a restricted operation--it has meaning (and is legal) only in an array subscript expression.



Bryan Carpenter 2002-07-11