[MacRuby-devel] Immutable foundation objects

Erik Österlund fisksvett at gmail.com
Sun Feb 14 07:29:34 PST 2010


Hello.

This is just a thought, but shouldn't for instance NSArray.alloc.init.frozen? return true, as it is immutable and cannot be changed? It is like a frozen version of NSMutableArray, isn't it?
It's a bit confusing when asking an immutable Foundation object if it is frozen, and it says no...
On the other hand, I suppose it's possible to create categories that add behavior that somehow modifies the object.

Any thoughts on this?

Thanks.


More information about the MacRuby-devel mailing list