On NSInvocation
I was going to get down to doing some writing, but then I got some new kit I needed to set up, so that isn’t going to happen. Besides which, I was talking to one developer about NSInvocation and...
View ArticleOn counting numbers
While we were at NSConference, Alistair Houghton told me that he was working on static NSNumbers in clang. I soon thought: wouldn’t it be nice to have code like this? for (NSNumber *i in [@10 times]) {...
View ArticleWhy we don’t trust -retainCount
I’m pretty sure @bbum must have worn through a few keyboards telling users of StackOverflow not to rely on the value of an Objective-C object’s -retainCount. Why? When we create an object, it has a...
View ArticleClass clusters, placeholder objects, value-oriented programming, and all that...
Have you ever seen this exception in your crash log? 2012-05-29 17:55:37.240 Untitled 2[5084:707] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘*** -length only...
View ArticleOn designing collections
Introduction This post explores the pros and the cons of following the design rule “Objects responsible for collections of other objects should expose an interface to the collection, not the collection...
View ArticleWhen single responsibility isn’t possible
This posted was motivated by Rob Rix’s bug report on NSObject, “Split NSObject protocol into logical sub-protocols”. He notes that NSObject provides multiple responsibilities[*]: hashing, equality...
View ArticleObjective-Curry
Sadly it’s not called Schoenfinkeling, but that’s the name of the person who noticed that there’s no reason to ever have a function with more than one argument. What you think is a function with two...
View Article
More Pages to Explore .....