Function types versus arrays
Alex Buckley
Alex.Buckley at Sun.COM
Fri Feb 12 15:06:15 PST 2010
John Rose wrote:
> The best way I know of to tag function arrays is to define function
> arrays as pseudo-arrays which work at runtime like a
> Collections.checkedList but look at the source level like arrays.
> The most surprising wrinkle of such a design, IMO, is that they would
> fail to be subtypes of Object[], much like int[] fails today.
This compilation strategy would also enable arrays of parameterized
types, and generally open the door to wonderful new type constructors
that are useful in source and whose representation is known to the JIT.
But unless we also change the compilation strategy for storing to an
Object[], the universal supertype will bite us every time. I feel like
we're peering over the edge of a very tall cliff.
Alex
More information about the lambda-dev
mailing list