Re: NSString and NSCopying Protocol
Re: NSString and NSCopying Protocol
- Subject: Re: NSString and NSCopying Protocol
- From: Ondra Cada <email@hidden>
- Date: Wed, 20 Nov 2002 05:19:56 +0100
On Tuesday, Nov 19, 2002, at 16:13 Europe/Prague, Starman wrote:
I think it could be something optimized, since you gain memory space
and computing time, but can we say that NSString conforms to NSCopying
Protocol ? It has not the behaviour a developer will expect....
Am I correct ?
No, you are not. The proper way a developer expects of any *immutable*
object is to have its -copy implemented as a plain "return [self
retain]". The advantages are obvious, there are no disadvantages.
---
Ondra Cada
OCSoftware: email@hidden
http://www.ocs.cz
private email@hidden
http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.