Getting My Head Around Immutability
- by Michael Mangold
I'm new to object-oriented programming, and one concept that has been taking me a while to grasp is immutability. I think the light bulb went off last night but I want to verify:
When I come across statements that an immutable object cannot be changed, I'm puzzled because I can, for instance, do the following:
NSString *myName = @"Bob";
myName =…