Re: [ANN] Cocoa Style for ObjC: 1 and 2
Re: [ANN] Cocoa Style for ObjC: 1 and 2
- Subject: Re: [ANN] Cocoa Style for ObjC: 1 and 2
- From: Scott Stevenson <email@hidden>
- Date: Wed, 27 Oct 2004 16:12:55 -0700
On Oct 27, 2004, at 2:13 PM, Ken Ferry wrote:
Does not saying
[NSFontManager sharedFontManager]
feel like you're repeating yourself?
To some degree, but I think the point is that the method should always
describe what's being returned. One of the points that the tutorial
makes is that Cocoa sacrifices brevity for clarity.
In my own code I always use +[Class sharedInstance]
To me saying "instance" more even more redundant. :)
Makes it easier to remember the method name too. For example, Apple's
way you need to
remember that the method is
+[NSHTTPCookieStorage sharedCookieStorage]
and not
+[NSHTTPCookieStorage sharedHTTPCookieStorage]
I'm not sure this matters as much as with Xcode autocomplete. Granted,
you could be using an editor that doesn't do this.
- Scott
--
http://treehouseideas.com/
http://theobroma.treehouseideas.com/ [blog]
_______________________________________________
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