Ok, I understand what CamelCase is. This question is relating to how to CamelCase the shortened version of Property List (PList). I am asking this because I am working on a PList parser in C# and knowing how everything in .NET is CamelCase, I am wondering, should it be PList or Plist (also why)?
|
|
|||
|
|
|
The rules for Pascal Casing in .NET are about as follows:
Since the 'P' is short for 'property', and 'list' is a full word, the correct capitalization is |
|||
|
|
|
In the case of OS X property lists they are usually referred to as ".plist" or "Property List." I would recommend not using the shortened version because that is not the actual name of the file type, but the extension. .NET is not actually CamelCase, but Pascal Casing; camel casing traditionally has the first letter be lowercase and further letters uppercase, while Pascal case has the first letter be uppercase. You may remove the rest of a word and retain the uppercase (as in "PList") but you shouldn't do that anyway, because its less descriptive. Additionally, .NET casing style requires that any acronym that is three or more letters be lowercased after the first letter, such that "Graphics Display Interface Tool" would be "GdiTool", NOT "GDITool". |
|||||||||
|
|
The camel case convention suggests that each distinct word joined into an identifier should have its first character capitalized. So for public .NET identifiers, I would go with PList. (the convention in .NET for private identifiers is to start with a lower case character though, so for class or routine variables it would be pList). |
|||
|
|
|
You know something's wrong when you worry over such trivialities. Choose whichever one suits you best and get back to worrying over making the code work. |
|||
|
|
