Function types versus arrays

Neal Gafter neal at gafter.com
Mon Feb 15 14:48:07 PST 2010


On Mon, Feb 15, 2010 at 1:57 PM, Howard Lovatt <howard.lovatt at iee.org> wrote:
> Neal Gafter gave an array example on his blog:
>
> http://gafter.blogspot.com/
>
> Using:
>
> http://www.artima.com/weblogs/viewpost.jsp?thread=278567
>
> It is translated to:

That's just not true.  Your post does not give any hint as to how
throw clauses or exceptions in function types are to affect the
translation.  The word "throws" doesn't even appear anywhere in your
post at all.  But I'm glad to see that you're now considering some of
the areas where your specification was completely lacking before.

How would your translation scheme handle the code below?  Your post
contains not a single hint.

   #void()(throws ChangedCharSetException, UnknownHostException,
SAXParseException)[] array1 =
      new #void()(throws ChangedCharSetException, UnknownHostException)[1];
   #void()(throws IOException, AWTException, SAXException)[] array2 = array1;

Cheers,
Neal


More information about the lambda-dev mailing list