On Monday, 29 August 2016 at 21:24:52 UTC, A D dev wrote:

Hi group,

Does D have anything like the generators of Python and some other languages?

Thanks.

Ranges serve some of the purposes that generators are often used for: http://dlang.org/phobos/std_range.html

But you can of course make true coroutine-based generators with fibres: http://dlang.org/phobos/core_thread.html#.Fiber

"fibre" is basically a synonym of "coroutine".

Reply via email to