Damian Conway wrote:
More is better. It was better to have upper as well as lower case
letters in variables. It is better to have - as well as _
Personally, I'd prefer to see the English conventions carried over to
the use of general use of hyphen and underscore in identifiers in
the core (and everywhere else).
By that, I mean that, in English, the hyphen is notionally a
"higher precedence" word-separator than the space
(or than its intra-identifier stand-in: the underscore).
The more specialised use of upper case letters, such as SYSTEM
identifiers, seems to have evolved over time.
Depending on my fancy, I sometimes use variables like "OriginalValue"
and sometimes "Starting-value". If the program is just for me, who
cares? If the software is for a company, they will set the rules.
Communities at large generate their own standards. Where it matters,
people obey them. Where rules are set because it is supposed to be a
"good thing", programmers take delight in breaking them.
Personally, the rule "use only - or _ consistently throughout a module"
reeks of a rule for rule's sake, one for the breaking.
Damian's suggestion seems to me very useful because (for those that wish
to follow it) it imposes an extra precision of thought, which almost
always facilitates better programming. Adopting it will, I think, lead
to more elegant code, for those that like that sort of thing.