I also modified the syntax for methods (and anonymous methods) to not just take a type expression as a return type. The syntax now allows for yields< type-exp > there. The method still returns IEnumerable like C# generators, but it's a little more explicit about what is going on (and happens to make my life easier since I don't have to inspect the entire method body to know if I need to generate the anonymous enumerable or not).
Also, I'm looking to make yield return X into simply yield X. I've not decided yet if I need/want yield break but will probably make return(); do that behavior if desired. So, example expected implementation:
public static yields from (int i) to infinity{ while(true){ yield i; i++; }}for each from 0 to infinity do (int x)=>void{ print x; };
And hopefully getting some type inference or perhaps making no lambda return type mean void return to make the end a little less verbose.
The ability to write iterators like that is simple and concise, I like it.
However, the ability I'd look forward the most with yield, applied to game scripting, would be to avoid state-machines and simply write procedural code sprinkled with some yields.[wink]