Function types versus arrays
Neal Gafter
neal at gafter.com
Sun Feb 14 13:59:17 PST 2010
On Sun, Feb 14, 2010 at 1:34 PM, Peter Levart <peter.levart at gmail.com> wrote:
> Isn't JavaMethodHandle a way to bring diversity among function types' runtime representation? At
> least some diversity. Let's say function types were represented as parameterized subclasses of
> JavaMethodHandle (just like BGGA did with interfaces). Runtime representation would be their
> erased (raw) conterparts - this means that all subtype-related function types would be
> represented by a single JavaMethodHandle subclass at runtime. This would bring at least some
> runtime safety. The question of course is whether half-safety is better then no safety at all.
That is one of the implementation techniques I assume is being
considered. It would not support arrays of function type, for exactly
the same reason that in Java today you can't create an array of a
parameterized type.
More information about the lambda-dev
mailing list