Skip navigation.
 
mlRe: NSString and NSCopying Protocol
FROM : Ondra Cada
DATE : Wed Nov 20 05:19:56 2002

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_removed>              http://www.ocs.cz
private        <email_removed>            http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list | <email_removed>
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

Related mailsAuthorDate
mlNSString and NSCopying Protocol Starman Nov 19, 16:13
mlRe: NSString and NSCopying Protocol Ondra Cada Nov 20, 05:19
mlRe: NSString and NSCopying Protocol Sherm Pendley Nov 20, 05:49
mlRe: NSString and NSCopying Protocol Glenn Howes Nov 20, 07:28
mlRE: NSString and NSCopying Protocol Jonathan E. Jackel Nov 20, 23:28
mlRe: NSString and NSCopying Protocol Finlay Dobbie Nov 23, 23:43