Why do common collection classes in Objective C like NSString, NSArray, NSDictionary etc have a mutable as well as an immutable version. What is the logic behind defining them s
In general for an API, an immutable class is going to be thread safe so you can read it directly in a background thread without worrying the contents will change...
That matters more for things like a collection where contents can shift and you might be in the middle of enumerating them.