• 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: Keary Suska <email@hidden>
  • Date: Tue, 22 Jan 2013 18:32:11 -0700

On Jan 22, 2013, at 6:18 PM, Jens Alfke wrote:

> 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.


I was thinking that by "language" the OP meant linguistic rather than programming. For the latter it is a bit easier to find the lowest common denominator, which is probably strictly ascii alpha and numbers, beginning with lowercase alpha and probably even a character limit of around 12. That would automatically exclude the identifier pattern example provided as most languages do not permit dashes in identifier names (that I know of). Additionally, for higher-level interpreted languages the app would need to understand identifier prefixes such as $, @ and % (and maybe &).

Best,

Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"


_______________________________________________

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

  • Prev by Date: Re: Best guess at expressing a string as a variable
  • Next by Date: Re: object.struct.element as lvalue
  • 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