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) ?
- From: Nor Jaidi Tuah <norjaidi tuah ubd edu bn>
- To: Luca Bruno <lethalman88 gmail com>
- Cc: Serge Hulne <serge hulne gmail com>, vala-list <vala-list gnome org>
- Subject: 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) ?
- Date: Sat, 9 Jul 2011 08:04:38 +0800
"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.
hand
Nor Jaidi Tuah
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]