Since generators are a special case of coroutines you would have to credit them to the coroutines creator, Melvin Conway, who proposed them in a paper in 1963. source
You can get the answer to that question on Wikipedia. Over there you will see that LISP have some support through libraries in 1958 but is CLU in 1975 which implemented them natively for first time.
Where did concept of yield keyword come from?
-
01-06-2022 - |
题
Similar question to this. Keyword yield
is present in three languages I know or I heard of: Python, Ruby, C#. They plan to introduce this keyword also to PHP. Where did it originally come from? I did no deep research, but it seems Python has it since 2003, which seems to be before C#.
Update: Let's divide this question into two parts:
- Who invited/introduced the concept of generators? Which language provided the first implementation? When?
- In which language did the
yield
keyword appeared first? What year?
解决方案
不隶属于 StackOverflow