• 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: Best guess at expressing a string as a variable
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Best guess at expressing a string as a variable


  • Subject: Re: Best guess at expressing a string as a variable
  • From: Jens Alfke <email@hidden>
  • Date: Tue, 22 Jan 2013 17:18:32 -0800

On Jan 22, 2013, at 3:28 PM, email@hidden wrote:

> Is  + (id)letterCharacterSet the best choice here?

The API docs say "Informally, this set is the set of all characters used as letters of alphabets and ideographs.”
Which very strongly implies it is not just ASCII, but covers all Unicode alphabets.

Some languages, like Java and Go, can handle non-ASCII letters in identifiers, but most can’t. I would stick with a character set consisting of only upper and lowercase ASCII letters, digits and the underscore. And you’d probably want to force the first character to be a lowercase letter since some languages assign special meaning to identifiers that start with a capital letter or with an underscore.

—Jens
_______________________________________________

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: Best guess at expressing a string as a variable
      • From: Keary Suska <email@hidden>
References: 
 >Best guess at expressing a string as a variable (From: "email@hidden" <email@hidden>)

  • Prev by Date: Re: How do I use CGDisplayCapture() to capture an NSOpenGLView in a XIB?
  • Next by Date: Re: Best guess at expressing a string as a variable
  • Previous by thread: Re: Best guess at expressing a string as a variable
  • Next by thread: Re: Best guess at expressing a string as a variable
  • Index(es):
    • Date
    • Thread