@gte That's one of the reasons I enjoy tweets by @Catfish_Man and @gparker. I absolutely love implementation details like those.
@mjtsai Fast enumeration requires a lot of compiler support and it just happened to be an Objective-C 2.0 feature. https://www.mikeash.com/pyblog/friday-qa-2010-04-16-implementing-fast-enumeration.html …
-
-
@mjtsai And many of the older classes (NSMenu, NSView, NSWindow, et cetera) have ivars no longer in use. - View other replies
-
@mjtsai In fact, NSWindow got so insane that a new class, NSWindowAuxiliary, was created to hold the additional ivars. -
@mjtsai As NSWindowAuxilary isn't public, Apple can add and remove ivars as needed without having the fragile base class problem. -
@rosyna So why are they still using it now that we have Objective-C 2? - View other replies
-
@mjtsai As long as the 32-bit i386 runtime exists, they can't dump the ivars from the headers, sadly. -
@rosyna So, again, this is not (yet) an actual performance improvement resulting from Objective-C 2. -
@mjtsai While NSWindow may have been good to show the pain of fragile base classes, it may have been bad for an optimization example -
@mjtsai a better example would be NSStringDrawing, all the Gesture Recognizer classes, NSIndexPath, various NSCollectionView classes - View other replies
- Show more
-
-
-
@rosyna Compiler support, yes. But I thought we were talking about breaking backward compatibility. -
@mjtsai Ah, in that specific case NSFastEnumeration was a new way without the trappings of being compatible with NSEnumerator. - View other replies
-
@mjtsai (yes, NSEnumerator conforms to NSFastEnumerator so it can be used with fast enumeration, without the speed increases)
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.
Rosyna Keller
Marcel Weiher
Michael Tsai