I don't think so. I think the python generator functions are modeled after
the C# yield keyword, which is a way to implement an iterator. I believe
tasks are quite a different beast. At least in C# tasks interact with the
async/await story really well. I think the julia tasks might be similar to
that, but I'm not sure.

In any case, having a yield keyword to implement standard iterators would be
fantastic. Simply a way to get the start, next and done methods implemented

> -----Original Message-----
> From: julia-users@googlegroups.com [mailto:julia-
> us...@googlegroups.com] On Behalf Of Mauro
> Sent: Thursday, October 13, 2016 6:00 AM
> To: julia-users@googlegroups.com
> Subject: Re: [julia-users] python-like generators?
> Isn't this the same as tasks in Julia?
> http://docs.julialang.org/en/release-0.5/stdlib/parallel/
> Although, note that their performance is not on par with start-next-done
> iteration.
> On Thu, 2016-10-13 at 14:46, Neal Becker <ndbeck...@gmail.com> wrote:
> > julia-0.5 supports generator expressions, ala python, which is very
> >
> > Any thoughts on supporting the more general python generator
> > functions, as described e.g.: https://wiki.python.org/moin/Generators?
> > I haven't used them much myself (well, once), but they seem a really
> idea.

Reply via email to