#34 new
Scott Guelich

Drop "get" prefix on getters

Reported by Scott Guelich | February 6th, 2009 @ 11:38 PM | in ObjectiveResource 1.1

Classes like ObjectiveResource and the NSObject methods use the "get" prefix for their getters. Although this is a common idiom in some languages like Java, the "get" prefix is always omitted in Cocoa except in a very specific case. From Apple's coding guidelines:

Use "get" only for methods that return objects and values indirectly. You should use this form for methods only when multiple items need to be returned.

So methods like "getRemoteId" and "getRemoteSite" would be better as "remoteId" and "remoteSite". Things like Key-Value-Coding also depend on this convention. Setters do use the set prefix, so they can stay as is.

References: * http://developer.apple.com/docum... * http://cocoadevcentral.com/artic... * http://cocoadevcentral.com/artic...

Note: I'm insanely impressed by this project and eager to try it out down the road. So this ticket is filed with the intention of helping make ObjectiveResource more intuitive and natural to use... not to nitpick. :)

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Port of Rails' ActiveResource framework to the iPhone.

Shared Ticket Bins

People watching this ticket

Pages