[squeak-dev] Re: Generators in Smalltalk?

Andreas Raab andreas.raab at gmx.de
Wed Feb 10 08:37:33 UTC 2010

Lukas Renggli wrote:
> I've fixed that. There could be more bugs, as I've never used them
> beyond the anecdotical examples showing off runtime reflection. I
> never saw a practical use of Generators in Smalltalk.

I have had some situations where I wanted them. Eliot's compression 
example is one of them - wrapping the algorithm into a Generator would 
allow trivial use of the algorithm recursively. Of course, the algorithm 
could be rewritten to do that iteratively but it's just nice and 
convenient to have a generator at hand that does it for you.

   - Andreas

More information about the Squeak-dev mailing list