Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> symmetric coroutines are the original style

This isn't quite correct, but it's close. The original style were co-routines, as distinguished from subroutines, this was when programming was still heavily goto-oriented, these were little more than patterns used to structure go-to.

Simula, if I recall correctly, was the first high-level language to have coroutines, and they were basically asymmetric. I say basically because there was a mechanism for a coroutine to replace itself with another coroutine, but it wasn't a general transfer mechanism. Not unlike a delimited continuation in fact.

Good summary of how it all works however! I believe this is a typo:

> In a stackless setting (such as Lua)

Since Lua is stackful, and you're contrasting it with stackless generators.



yup, was a typo >_<




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: