digitalmars.D.learn - Does D have anything like the generators of Python and some other
- A D dev (4/4) Aug 29 2016 Hi group,
- Cauterite (6/10) Aug 29 2016 Ranges serve some of the purposes that generators are often used
- A D dev (2/6) Aug 29 2016 Thanks. Both sound interesting. Will check.
- =?UTF-8?Q?Ali_=c3=87ehreli?= (5/12) Aug 29 2016 Here is an example of a generator fiber:
- A D dev (2/3) Aug 29 2016 Thanks, will take a look.
- Meta (5/9) Aug 29 2016 There's a Generator class in std.concurrency. I haven't used
- A D dev (2/4) Aug 30 2016 Thanks, Meta.
Hi group, Does D have anything like the generators of Python and some other languages? Thanks.
Aug 29 2016
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 "fibre" is basically a synonym of "coroutine".
Aug 29 2016
On Monday, 29 August 2016 at 21:28:15 UTC, Cauterite wrote: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 withThanks. Both sound interesting. Will check.
Aug 29 2016
On 08/29/2016 02:50 PM, A D dev wrote:On Monday, 29 August 2016 at 21:28:15 UTC, Cauterite wrote:Here is an example of a generator fiber: http://ddili.org/ders/d.en/fibers.html#ix_fibers.Generator,%20std.concurrency AliRanges 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 withThanks. Both sound interesting. Will check.
Aug 29 2016
On Monday, 29 August 2016 at 22:03:35 UTC, Ali Çehreli wrote:Here is an example of a generator fiber:Thanks, will take a look.
Aug 29 2016
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.There's a Generator class in std.concurrency. I haven't used Python all that much so I can't say for certain whether it is the same or not. https://dlang.org/phobos/std_concurrency.html#.Generator
Aug 29 2016
On Tuesday, 30 August 2016 at 00:57:05 UTC, Meta wrote:There's a Generator class in std.concurrency. I haven't usedhttps://dlang.org/phobos/std_concurrency.html#.GeneratorThanks, Meta.
Aug 30 2016