Function types versus arrays

Neal Gafter neal at gafter.com
Mon Feb 8 15:37:23 PST 2010


On Mon, Feb 8, 2010 at 2:52 PM, Howard Lovatt <howard.lovatt at gmail.com> wrote:
> It would be very odd if arrays of function types were not supported,
> just not Java. The worry about ArrayStoreExceptions is in my
> experience overstated, it is exceptionally rare and caught at runtime
> anyway.

The worry is the *absence* of ArrayStoreException when a lambda with
the wrong type is placed into an array.  If we could make it safe at
runtime by throwing ArrayStoreException, then I wouldn't be worried
about allowing arrays of function type.


More information about the lambda-dev mailing list