ext_3000 ([identity profile] kragen.livejournal.com) wrote in [personal profile] maradydd 2009-05-29 06:51 am (UTC)

No. Here are some things you can do with real continuation support that you can't do with generators in Python:


  • Pass a continuation to a subroutine, which then invokes it. (You can pass a generator to a subroutine, but the generator can't pass its ability to yield a value to its caller to a subroutine.)
  • Return from the same function call more than once.
  • Unwind the stack when, say, you have an error or a recursive search finds what it was looking for.


The surprising thing is that it turns out to be possible to implement such a general construct efficiently.

Post a comment in response:

If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org