RE: JavaMemoryModel: A new box for the Java Memory model

From: David Holmes (
Date: Tue Nov 09 1999 - 16:47:14 EST

> -----Original Message-----
> From: Joshua Bloch []
> Whoa - language changes are very serious business! What
> syntax do you propose for the extension? I sure hope we don't end up
> anything like what C/C++ did to distinguish between a volatile pointer
to an
> int and a pointer to a volatile int.

Thinking more on this I really don't see syntax being a problem:

final int[] foo; // a final reference to an int array
final int foo[]; // ditto
int[] final foo; // a reference to an array of final ints
int final foo[]; // ditto
final int[] final foo; // a final reference to an array of final ints
final int final foo[]; // ditto

Modifiers to the variable always appear first in the declaration ie.
   public final int[] x;

If the modifier appears between the typename and variable name then it has
to apply to the array element.

Things are much messier with C/C++ pointer types but Java doesn't have that


JavaMemoryModel mailing list -

This archive was generated by hypermail 2b29 : Thu Oct 13 2005 - 07:00:22 EDT