Iterators & generators (RE: Real Problems with Python)

François Pinard pinard at iro.umontreal.ca
Sat Feb 26 18:24:34 EST 2000


Fernando Pereira <pereira at research.att.com> writes:

> In article <001601bf7853$6b03e7e0$b7a0143f at tim>, Tim Peters
> <tim_one at email.msn.com> wrote:

> > In fact, coroutines most often pop up in languages designed for writing
> > event simulations (like Simula-67, which is a wonderful early one that
> > also anticipated much of modern OO machinery!).

Simula-67 was very impressive, indeed.  It's main drawback was to be
so based on Algol-60, who was pretty weak about types.  Of course, we
could somewhat use classes for types, but it was becoming a bit heavy.
If we forget that weakness, Simula-67 is still revolutionary, in a sense.
The language was also designed so it was possible to produce speedy
implementations, something which has never been natural in Algol-60.

> A cynic might say that Java is just a Simula-67 idiom with {} instead
> of BEGIN END.  Simula-67 coroutines were much simpler to use than Java
> threads for producer/consumer patterns.

Many years ago, I asked to our local language specialist what were his
impressions about C++.  He replied very laconically by saying: Simula--.
But it is quite that, indeed.

-- 
François Pinard   http://www.iro.umontreal.ca/~pinard






More information about the Python-list mailing list