Re: [Vala] Is there a way to use the Vala coroutines to achieve the same effect as in the following Python snippet (coroutines returning partial results in an iterator-like way) ?

"The yield statement is only used when defining a generator function, and is
only used in the body of the generator function. Using a yield statement in
a function definition is sufficient to cause that definition to create a
generator function instead of a normal function."

I use such feature before in Ruby and miss it in Vala.
So, I'm anxiously awaiting the answer to the following question
in the original post.

- Can a similar effect be achieved in Vala using coroutines (or
something else) ?

"coroutines" has been crossed out. How about "something else"?
Perhaps Vala should support this feature explicitly.

Nor Jaidi Tuah

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]