Re: Best guess at expressing a string as a variable
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