Preferences

Actually, I think coroutines are easier to understand in higher-level languages that support call/cc -- Scheme, for example. Yield is just another continuation, no different from return, throw, restart, etc.

I agree and disagree. Coroutines can be thought of as a degenerate case of continuations (sometimes called "single-shot continuations"). I contend that understanding continuations is at least as hard as understanding coroutines, but that if you understand one concept the other follows easily. So for people already comfortable with continuations, I agree, otherwise I disagree (in fact, I had a hard time grokking continuations until I thought of them as generalized coroutines).

This item has no comments currently.

Keyboard Shortcuts

Story Lists

j
Next story
k
Previous story
Shift+j
Last story
Shift+k
First story
o Enter
Go to story URL
c
Go to comments
u
Go to author

Navigation

Shift+t
Go to top stories
Shift+n
Go to new stories
Shift+b
Go to best stories
Shift+a
Go to Ask HN
Shift+s
Go to Show HN

Miscellaneous

?
Show this modal