Control Invocation Syntax++

Neal Gafter neal at
Wed Dec 23 08:17:57 PST 2009

On Wed, Dec 23, 2009 at 12:00 AM, Peter Levart <peter.levart at> wrote:
> But what about the idea of ParExpression alone:
>   ParExpression:
>       ( [BlockStatements] Expression )
>       ( BlockStatements )
> It would simplify expression lambdas when they are not used as functions but only as transparent closures. That's something BGGA has and although it is perceived as "strange" syntax, I like it.

There is a tradeoff here.

On the one hand, you'd like it to be as simple as possible to write
'transparent' closures.  The situation which you're simplifying is the
one in which you need statements in the closure, need transparent
control flow to the enclosing scope, don't have a result from the
closure, and can't use the control invocation syntax.  I think that is
an uncommon situation, but I do believe it is important to support it.
 That is possible in 0.6b, but it requires a bit of boilerplate, which
you're proposing to eliminate.

On the other hand, you've reintroduced from BGGA the possibility that
something as small as a missing (or added) semicolon can change the
semantics of the code.  I felt that this was enough of a downside to
write the specification as I did.


More information about the closures-dev mailing list