3 ms·
> Weird that the yield statement is conflated with coroutines instead of iterators/generators. The concept of coroutines (Melvin E. Conway in 1963; who was als
by adrian_b 3y ago
> Weird that the yield statement is conflated with coroutines instead of iterators/generators.
The concept of coroutines (Melvin E. Conway in 1963; who was also the source of FORK/JOIN) predates by a decade that of iterators/generators (which come from Alphard and CLU).
The term "yield" had already been used for many years for coroutines before being used for iterators/generators.
Usually the use of "yield" is not ambiguous, because the context is clear.
- gpderetta 3y agoTo go full circle, before python had built-in async/await, it was emulated (in twisted applications for example) via yield.