On 01 Apr 09, at 19:04, Sam Krishna wrote:
Does anyone here know of any Obj-C functional equivalent to Python
generator functions? These are *categorically* different that the
Spotlight API generator functions.
Depends on what you're after. If all you need is to be able to iterate
over an object, you can implement fast enumeration:
http://developer.apple.com/documentation/Cocoa/Conceptual/ObjectiveC/Articles/ocFastEnumeration.html
If you actually want the continuation behavior of generators, though,
there's no way to get that in C (or ObjC, or C++) at the moment
without massive, horrifying hacks.
_______________________________________________
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com