Allen's lambda syntax proposal

David-Sarah Hopwood david.hopwood at
Sun Dec 7 07:08:30 PST 2008

David-Sarah Hopwood wrote:
> Jon Zeppieri wrote:
>> On Sat, Dec 6, 2008 at 11:49 AM, Maciej Stachowiak <mjs at> wrote:
>>> On Dec 5, 2008, at 11:12 PM, Jon Zeppieri wrote:
>>>> I don't get it.  What issue is raised by return-to-label that isn't
>>>> already raised by exceptions? [...]
>> Also, what was the performance issue?
> The (minor) performance issue is that if there is a lambda that returns
> from a given function, all calls within that function body must check
> for an escape, even if the lambda is never passed to them or otherwise
> accessible to them. Similarly for calls within the scope of a labelled
> statement or iteration that contains a lambda with a corresponding
> 'break' or 'continue'.

Please disregard this -- I had overlooked a way to make the performance of
escape continuations identical to that of exceptions. No explicit per-call
checks are needed; the jump to the break/continue/return target can be
handled using the same mechanism as try/catch handlers, with the same
possible optimizations. In the case where the control abstraction is
built-in or its implementation is inlined, the performance can be the
same as conventional break/continue/return.

David-Sarah Hopwood

More information about the Es-discuss mailing list