Re: substring return a new string?
Re: substring return a new string?
- Subject: Re: substring return a new string?
- From: Marco Scheurer <email@hidden>
- Date: Thu, 18 Mar 2004 21:34:46 +0100
On Mar 18, 2004, at 9:28 PM, Ondra Cada wrote:
Marco,
On Thursday, Mar 18, 2004, at 21:11 Europe/Prague, Marco Scheurer
wrote:
It may be safe, but it does not make it right. What you do is
advertising a mutable property of your object,
No I am not--not in the sense at least I understand "property". Does,
for example, -[NSFileManager subpathsAtPath:] return a "file manager
property"? This case, I am just _generating an object on the user's
behalf_. The object happens to be mutable. I can see absolutely no
problem in that.
There is a problem: how am I supposed to know the implementation detail
that this a generated on the fly value and not a cached value of
NSFileManager? In other words, how am I supposed to know that changing
it will not change the state of NSFileManager? Just because you decided
to advertise it as returning NSMutableArray? This would be a really
weird convention, and frankly I've never seen anything like that.
Marco Scheurer
Sen:te, Lausanne, Switzerland
http://www.sente.ch
_______________________________________________
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.