There are some scenarios where NSString acts as a class cluster internally to optimize handling of certain strings. One such case bit me today, and so I want to tell you about it.
Class clusters work such that you think you are always dealing with just instances of NSString, but in reality the runtime goes and chooses different subclasses for certain tasks. You might have already seen some effects of this behavior when debugging and the debugger actually showing you something other than NSString as the type of a variable.

