• 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: Style Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Style Question


  • Subject: Re: Style Question
  • From: "Alex Wait" <email@hidden>
  • Date: Fri, 27 Jun 2008 22:15:57 -0700

I was meaning to imply that if it was called "FirstName" would setFirstName
still be called?

I know the convention for naming variables. :)

On Fri, Jun 27, 2008 at 10:13 PM, Jens Alfke <email@hidden> wrote:

>
> On 27 Jun '08, at 9:44 PM, Alex Wait wrote:
>
>  if I have a member, let's say a NSString, called FirstName...
>> would the setter still be setFirstName?
>>
>
> Yes. But you shouldn't name the property "FirstName". Property and method
> (and instance variable) names should be lowercased. There are some
> exceptions made when the name begins with an acronym, most commonly "URL",
> that needs to remain uppercase for legibility.
>
> Honestly, no one reading your code is going to care whether you put braces
> at the end of a line or on a new line. But naming conventions are important
> and can help or confuse other people (or yourself, a year later) trying to
> understand it.
>
> —Jens




--
If you can't be kind, at least have the decency to be vague.
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Style Question
      • From: "Hamish Allan" <email@hidden>
References: 
 >Style Question (From: "Alex Wait" <email@hidden>)
 >Re: Style Question (From: "Shawn Erickson" <email@hidden>)
 >Re: Style Question (From: "Alex Wait" <email@hidden>)
 >Re: Style Question (From: Jens Alfke <email@hidden>)

  • Prev by Date: Re: Style Question
  • Next by Date: KVO Question -- Really Simple for Pros
  • Previous by thread: Re: Style Question
  • Next by thread: Re: Style Question
  • Index(es):
    • Date
    • Thread