M
Mad Hamish
But produces more compilation errors.Underscores are basically a way to provide spaces in an identifier. Since
identifiers are generally phrases (nown phrases for objects, verb phrases
for procedures) and phrases often consist of more than one word, I find the
use of underscores to be quite natural.
The opposing argument is that underscores are too large, and that a case
change is a more readable way to indicate how to divide the decomposition
into words. To me, the upper / lower case method of delineate the words in
an indentifier has always looked like the transcript of a very fast talker.
Yes, you can make out the words, but just barely. Moreover, the use of
letter case to delineate words prohibits any other use of letter case. It
rules out using all caps for a certain category of identifiers, for example.
There is an easy way to test which convention is more readable. Here is one
of Shakespeare's sonnets rendered in the mixed case format:
FromFairestCreaturesWeDesireIncrease,
ThatTherebyBeautysRoseMightNeverDie,
ButAsTheRiperShouldByTimeDecease,
HisTenderHeirMightBearHisMemory:
ButThouContractedToThineOwnBrightEyes,
FeedstThyLightsFlameWithSelfSubstantialFuel,
MakingAFamineWhereAbundanceLies,
ThySelfThyFoeToThySweetSelfTooCruel:
ThouThatArtNowTheWorldsFreshOrnament,
AndOnlyHeraldToTheGaudySpring,
WithinThineOwnBudBuriestThyContent,
AndTenderChurlMakstWasteInNiggarding:
PityTheWorldOrElseThisGluttonBe,
ToEatTheWorldsDueByTheGraveAndThee
It may be a matter of taste, but I certainly found the original sonnet to be
more readable and more beautiful.
Hence the mixed case format must be better for programming.
--
"Hope is replaced by fear and dreams by survival, most of us get by."
Stuart Adamson 1958-2001
Mad Hamish
Hamish Laws
(e-mail address removed)