How would shallow generators compose with lambda?

Mark S. Miller erights at google.com
Thu May 14 14:50:23 PDT 2009


On Thu, May 14, 2009 at 2:38 PM, Brendan Eich <brendan at mozilla.com> wrote:
> On May 14, 2009, at 2:10 PM, Mark S. Miller wrote:
>
>> It seems that either lambda or generators by themselves may be ok, but
>> together they make a fatal combination. Whichever we might eventually
>> decide to add to Harmony, we probably forever preclude the other. I do
>> not yet have an opinion on which.
>
> Just to be extra clear (for my benefit, at least ;-), is the problem the
> finally-may-not-run issue?

Yes.


> If so, did you have a different way of reasoning about the reasons today why
> finally might not run that I mentioned (iloop detection or other hard stop)?

Those hard stops kill all further activity within that event loop.
Once a universe has been destroyed, no further bad things can happen
in that universe.

Infinite loops don't kill their universe, so this case is similar but
different. As the halting problem teaches us, an infinite loop is
generally indistinguishable from a loop that hasn't terminated yet.
Since control flow has not yet escaped the loop, it hasn't yet
bypassed the finally, and so no invariants have yet been violated.

-- 
    Cheers,
    --MarkM


More information about the es-discuss mailing list