Apple consciously separates mutable and immutable variants of classes in Objective-C. If you have an NSString you cannot modify it, only by creating a new one with additions to an old one. If you want to mutilate mutate the string itself you have to use it’s subclass NSMutableString. Internally those are the same CoreFoundation type, yet the design choice was to have an immutable class and add mutability methods in a subclass.
There are two items that are not immediately obvious if you start out learning to program Objective-C, that I’d like to chronicle. One of these stumped me just a few days ago.