News for hackers. Stuff that matters.
Re:TheKitchenSync - A Tool Belt for iOS Concurrency by aaronbrethorst on Monday May 13, 2013 @06:37PM (#5701892)

    they make it impossible to test which a collection is.
Couldn't you just test with the following?

    // NSMutableDictionary
    [dict respondsToSelector:@selector(setObject:forKey:]

    // NSMutableArray
    [arr respondsToSelector:@selector(addObject:)]

    // NSMutableString
    [str respondsToSelector:@selector(replaceCharactersInRange:withString:)]

    // NSMutableSet
    [set respondsToSelector:@selector(addObject:)]
Although, personally, I'd rather just, either at the class or method boundary depending on the circumstances, only expose the non-mutable variants.
Re:TheKitchenSync - A Tool Belt for iOS Concurrency by rogerbinns on Tuesday May 14, 2013 @01:32AM (#5703131)
None of those work. (Try it.) The reason is that NSMutableXXXX is a wrapper around an underlying Core Foundation "object". You'll always get success from the Objective C level and then an exception when you try the action from the CF level.

Example SO question: http://stackoverflow.com/questions/1788690/objective-c-how-t...

Another example discussion: http://www.cocoabuilder.com/archive/cocoa/224795-nsdictionar...