return when desugaring to closures
Mark S. Miller
erights at google.com
Mon Aug 25 20:51:25 PDT 2008
On Mon, Aug 25, 2008 at 7:24 PM, Dave Herman <dherman at ccs.neu.edu> wrote:
>> But I'd still rather not try to understand generators
>> by CPS-transforming the relevant bits of the RI.
> A little confused here-- was that an errant "not"?
No. I meant that, since I understand continuation by CPS-transform, if
the RI and/or the spec explains generators by absorbing them into
SML's delimited continuations, then I'd need try to understand
generators by CPS-transforming that portion of the RI's
implementation. Given a choice between understanding generators that
way vs. understanding them by CPS transforming the ES generator code,
the latter seems preferable. Again, this may just be a personal
idiosyncrasy. I do not yet have an opinion about how this should be
Thank you and Brendan for your explanations. They truly did help a lot.
How important is it that yield be an expression rather than a
statement? It seems like a sibling of return and throw, so I don't
think anyone coming to them afresh would be surprised if yield were a
More information about the Es-discuss