3 ms·
The author considers "immutable arrays" to be different than "arrays". Due to the technical definition of an array in .NET maybe? In Obj-C you would just return
by tolmasky 16y ago
The author considers "immutable arrays" to be different than "arrays". Due to the technical definition of an array in .NET maybe? In Obj-C you would just return an NSArray instead of an NSMutableArray and avoid the whole first part of this argument.
- btrask 16y agoThis is an example of bad terminology (or arguably a defective class library) clouding one's understanding. If you change the title to "MUTABLE arrays considered somewhat harmful", all of his complaints ring true. Merely changing the way arrays are defined makes the solution simple and obvious. I am frequently impressed by the subtle aspects that Cocoa got right (another example is autorelease pools).