14

When starting a word with a vowel, the preceding "a" becomes an "an". I often find that when writing words that start with letter "N" or "M", I will pronounce them "EN", "EM", etc. (This is because in programming, letters are often pronounced in certain terms.)

So, when writing a question on SO, do I write "an NSString" or, "a NSString"?

25

The choice of a vs. an is actually based on the phonetics of the start of a word, not the orthographic representation. This is why you say things like an honorable solider (the h is silent, so phonetically it begins with the vowel sound). Similarly, you would say a one-eyed pirate as one phonetically begins with the w sound.

So in the case of your example, it would be an NSString since phonetically it's en-es-string.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.