Talk:Generator (computer programming): Difference between revisions

Content deleted Content added
Generator in Ruby: coroutines?
Line 151:
 
:: Iterators, generators and coroutines seem to be related but different. The [[coroutine]] article mentions: "Coroutines in which subsequent calls yield additional results are often known as generators." Is that the right way to define what a generator is? The article also has a link to a Japanese page about coroutines in Ruby. --[[User:TuukkaH|TuukkaH]] 13:55, 30 August 2006 (UTC)
 
::: That's probably not entirely inaccurate, but it should be understood that, generally speaking, coroutines are a superset of generators. (A generator is more-or-less a suspendable/resumable stack frame; a coroutine is more-or-less a suspendable/resumable call stack.) --[[User:Piet Delport|Piet Delport]] 19:21, 30 August 2006 (UTC)