lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

> Sorry, but what's called coroutines in Lua 5.0 are no coroutines.
> You may call it "microthreads" or something like that, but not
> coroutines.

Yes, the "official" name is semi-coroutines, because of this lack of
symetry. Of course, it is trivial to implement "real" coroutines on top
of semi-coroutines (as it is the other way around). Because of this
equivalence, it sounds to me a little pedantic to insist in the use of
"semi-coroutines" instead of the shorted "coroutines", when it is clear
from the context what you mean.

IMHO, I find semi-coroutines easier to explain and easier to use (for
several real applications) than "real" coroutines.

-- Roberto