• 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: [ANN] Cocoa Style for ObjC: 1 and 2
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ANN] Cocoa Style for ObjC: 1 and 2


  • Subject: Re: [ANN] Cocoa Style for ObjC: 1 and 2
  • From: The Amazing Llama <email@hidden>
  • Date: Fri, 29 Oct 2004 07:51:02 -0700

On Oct 28, 2004, at 8:00 PM, Roarke Lynch wrote:
On Oct 28, 2004, at 8:53 AM, Andreas Mayer wrote:
Am 27.10.2004 um 22:08 Uhr schrieb The Amazing Llama:
-infoForURL:
or
-infoWithURL:

although I'm still trying to decide which makes more sense, for or with.

I'm using 'objectForX:' when X is just used to look up object and 'objectWithX:' when X will be added to / included in object.

I semi-agree. I would assume that infoForURL will return an object which the receiver already owns, while infoWithURL would return a newly created instance of info using URL in some fashion.

Once again, I'll come in and muddy the waters.

I have a parkWithName: object in a project I'm working on. It looks in the parksByName dictionary, and if it finds something, it returns that. If it doesn't, it creates the object, adds it to the dictionary, and returns it. This follows the "when X will be included in object" idea, because the park "owns" its name, even though that is also the key to the dict. But it follows both Roarke's rules, so once again, this proposal is too right.

Seth A. Roby The Amazing Llama < mail or AIM me at tallama at mac dot com>
"Life is like an exploded clown. It's really funny until you figure out what just happened."

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
References: 
 >[ANN] Cocoa Style for ObjC: 1 and 2 (From: Scott Stevenson <email@hidden>)
 >Re: [ANN] Cocoa Style for ObjC: 1 and 2 (From: The Amazing Llama <email@hidden>)
 >Re: [ANN] Cocoa Style for ObjC: 1 and 2 (From: Andreas Mayer <email@hidden>)
 >Re: [ANN] Cocoa Style for ObjC: 1 and 2 (From: Roarke Lynch <email@hidden>)

  • Prev by Date: Re: Const help
  • Next by Date: Re: Framework and Prebinding
  • Previous by thread: Re: [ANN] Cocoa Style for ObjC: 1 and 2
  • Next by thread: Re: [ANN] Cocoa Style for ObjC: 1 and 2
  • Index(es):
    • Date
    • Thread