Generators: Historical Note

Jeremy Hylton jeremy at alum.mit.edu
Thu Aug 22 20:50:30 CEST 2002


Tim Roberts <timr at probo.com> wrote in message news:<g9r8muspog66ge3k0j007ii7825c2u79jk at 4ax.com>...
> We are in the process of cleaning out 25 years of accumulation from our
> attic.  In doing so, I've found some wonderful old gems that mean more to
> me now than they did at the time.
> 
> One example is an issue of the ACM's SIGPLAN Notices from 1979.  The issue
> contains an article from Ralph Griswold (creator of SNOBOL) describing his
> brand new creation, Icon.  One of the things he was really proud of was the
> introduction of generators.  In fact, there are a number of things in his
> description of Icon that have found their way into Python.
> 
> Now, I certainly didn't think that generators were a brand-new idea, but I
> was a bit surprised to find them mentioned as far back as 1979.

The idea clearly predates 1979, although I'm not sure where it
originates.  CLU has iterators, which are equivalent to Python's
generators.  CLU iterators were inspired by Alphard generators.  In "A
History of CLU", Liskov writes: "We first learned about [Alphard
generators] in the summer of 1975 when we visited the Alphard group at
CMU."  (http://www.pmg.lcs.mit.edu/CLU.html)  CLU was the oldest
language that I was familiar with that had an iterator / generator
concept.

Alphard generators are discussed in 
Mary Shaw, William A. Wulf, Ralph L. London.  Abstraction and
verification in Alphard: defining and specifying iteration and
generators.  Communication of the ACM, Aug 1977, pp. 553 - 564.

They cite IPL-v generators and Lisp mapping functions as related
concepts.  I don't know anything about IPL-V, except that Newell,
Feigenbaum, and others wrote a book about it in 1964.  This stuff goes
way back.

Jeremy



More information about the Python-list mailing list