Thanks for the pointer.

>From a programmer's point of view: Generators (iterators) and recursion are 
>central features of all modern programming languages. They should not be 
>limited unnecessarily.

Generators/iterators should have all benefits of a normal procedure (i.e. allow 
for forward declarations, recursion, being passable to another proc/iterator, 
allowing for premature exit with 'return') The only difference between a 
generator/iterator and a procedure should be that a generator maintains some 
data between calls.

The argument of "being inlined currently" doesn't convince me. The compiler 
should find out itself if it can inline a given iterator or not, and if it 
needs some sort of closure. It's not the responsibility of the programmer to 
add a 'closure' pragma.

Reply via email to