@rosyna Why wouldn't fast enumeration have been possible before? Were there really a lot of unused ivars removed?
-
-
@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 …0 replies 0 retweets 0 likes -
@mjtsai And many of the older classes (NSMenu, NSView, NSWindow, et cetera) have ivars no longer in use.0 replies 0 retweets 0 likes -
@mjtsai In fact, NSWindow got so insane that a new class, NSWindowAuxiliary, was created to hold the additional ivars.0 replies 0 retweets 0 likes -
@mjtsai As NSWindowAuxilary isn't public, Apple can add and remove ivars as needed without having the fragile base class problem.0 replies 0 retweets 1 like -
@rosyna So why are they still using it now that we have Objective-C 2?0 replies 0 retweets 0 likes -
@mjtsai As long as the 32-bit i386 runtime exists, they can't dump the ivars from the headers, sadly.0 replies 0 retweets 0 likes -
@rosyna So, again, this is not (yet) an actual performance improvement resulting from Objective-C 2.0 replies 0 retweets 1 like -
@mjtsai While NSWindow may have been good to show the pain of fragile base classes, it may have been bad for an optimization example0 replies 0 retweets 0 likes -
@mjtsai a better example would be NSStringDrawing, all the Gesture Recognizer classes, NSIndexPath, various NSCollectionView classes0 replies 0 retweets 0 likes
@rosyna Interesting that they added hash ivar for NSIndexPath. NSStringDrawing is a category so not sure what you are referring to there.
-
@mjtsai err, NSStringDrawingContext.0 replies 0 retweets 0 likes
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.
Michael Tsai
Rosyna Keller