3 ms·
It's not surprising you didn't come across it -- I never did in school either. From what I can tell, it's because coroutines were an old idea that were eclipse
by chubot 14y ago
It's not surprising you didn't come across it -- I never did in school either. From what I can tell, it's because coroutines were an old idea that were eclipsed by OS threads and the like. They basically became interesting again when OS threads reached scalability limits.
This paper by the authors of Lua has some good historical background:
http://lambda-the-ultimate.org/node/2868 http://lambda-the-ultimate.org/node/2868
They also poke fun at Python in some ways because the coroutines are fairly limited. Python got them sort of ad hoc with yield in Python 2.4 and send() in Python 2.5. I think Python is by far the most popular language with any kind of coroutine. Coroutines aren't very popular or well understood.