Alternative syntax for closures

Neal Gafter neal at
Tue Jul 15 12:23:11 PDT 2008

On Tue, Jul 15, 2008 at 10:05 AM, Rémi Forax <forax at> wrote:

> FileReader reader=...
> with(reader) {
>  throw new AnotherException();
> }
> is compile like this:
> FileReader reader=...
> with(reader,new VVE() {
>  public void invoke() throws AnotherException {
>    throw new AnotherException();
>  }
> });
> here the compiler awaits two catch blocks
> to catch AnotherException and IOException.

I'd like to know what language rules you have in mind that would result in
the compiler inferring that this "with" invocation can throw

As i said, i've just proposed a new syntax, not a new semantics.

Your handling of exceptions appears to be new semantics compared to BGGA,
and I don't yet understand how you intend it would work.

-------------- next part --------------
An HTML attachment was scrubbed...

More information about the closures-dev mailing list