• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: substring return a new string?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.


  • Follow-Ups:
    • Re: substring return a new string?
      • From: Ondra Cada <email@hidden>
References: 
 >Re: substring return a new string? (From: Ondra Cada <email@hidden>)

  • Prev by Date: Re: substring return a new string?
  • Next by Date: Re: substring return a new string?
  • Previous by thread: Re: substring return a new string?
  • Next by thread: Re: substring return a new string?
  • Index(es):
    • Date
    • Thread