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 automatically. > -----Original Message----- > From: [email protected] [mailto:julia- > [email protected]] On Behalf Of Mauro > Sent: Thursday, October 13, 2016 6:00 AM > To: [email protected] > 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 <[email protected]> wrote: > > julia-0.5 supports generator expressions, ala python, which is very nice. > > > > 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 cool > idea.
