Fast Enumeration, a facet of the Objective-C 2.0 language, is awesome.
I’m finally working on a project where Mac OS X 10.5 is the minimum, so I can start using more “modern” conveniences. And boy, being able to write:
for (id obj in container) {
[obj doSomething];
}
instead of:
NSEnumerator* containerEnumerator = [container objectEnumerator];
id obj = nil;
while ((obj = [containerEnumerator nextObject])) {
[obj doSomething];
}
is just awesome. I know it seems small, but when you type tons of code in a day, such simplicity in code is fantastic.