views:

165

answers:

1

The first time I saw the yield keyword in C# I thought "yuck what a way to junk up the language". Having grown since then and actually used the language I find it so pleasantly simple to express state logic that I'd like to use a similar approach in other development platforms.

I'm exploring Objective-C for some support utilities. Is there anything like the C# yield keyword for Objective-C?

+4  A: 

There's no real support for it in the language as far as I know, but here's an implementation someone took the time to build, might be helpful.

ChristopheD
Use of blocks means it requires Mac OS X ≥10.6 or iPhone OS ≥4.0 (for official support.)
KennyTM