Non-local transfers: deja-vu

Ricky Clarkson ricky.clarkson at
Mon Jan 4 08:31:10 PST 2010

I think it's worth bringing up again, because like it or not, closures
will end up getting used for flow control.  Perhaps Neal can find an
approach that does not cause the repulsion we saw.  Return with a
label is probably easier to stomach than the 'magic' return proposed
in BGGA.

2010/1/4 Gernot Neppert <mcnepp02 at>:
> Hello all,
> first of all, I need to say I'm thrilled that a simplified syntax for
> anonymous function types is going to be part of Java finally!
> What amazes me, however, is the fact that Neal Gafter's proposal about
> a "Control Invocation syntax" is being seriously considered again.
> Of course I don't dispute his right to bring it up again, but I wonder
> why nobody seems to remember that BGGA died largely due to the heated
> debate about the insurmountable intricacies that ensued this proposal.
> The following example was discussed today in this mailing list:
> #int() one = null;
> synchronized int sum(int n) {
>  if (one == null) one = #() { return 1; };
>  return n == 0 ? 0 : sum(n-1) + one();
> }
> To me, the idea that the expression "return 1" within the lambda
> should mean anything else but return the value 1 from the lambda is
> absurd!
> So I'm asking: Do we really *want* either of Control Invocation Syntax
> or Non-Local Transfers  (the former requiring the latter but not vice
> versa)?
> Cheerio,
> Gernot

Ricky Clarkson
Java and Scala Programmer, AD Holdings
Skype: ricky_clarkson
Google Talk: ricky.clarkson at
Google Wave: ricky.clarkson at

More information about the closures-dev mailing list