Quoting from the Book of Gensys in the Chronicles of Cyberdom...
"In the beginning was the mainframe and it did not recognize lower case for
programming."
I know it's hard to believe, but there wasn't ALWAYS agreement on a "byte"
being 8 bits. Some architectures used 6 bits either as a character or as
part of a "word". That meant that, in order to represent lower case
characters "control" or "shift" characters had to be inserted into the data
stream. That could get messy so it was just easier to use only upper case.
As a result, by the time everybody standardized on the 8 bit byte (which
could easily support lower case) it was too late, and programming in upper
case had become the accepted norm.
After the ice age when computing was re-invented in the early 1980s by the
advent of desktop machines and personal computers, the demand for proper
text and word processing, using both cases exploded.
I can remember a Director in a major UK Corporation saying to me:
"My kid can poroduce documents in upper and lower case and put a signature
on them, with his Amiga, but we have a multi-million pound mainframe that
sends letters to customers on green lineflo in upper case, with no
signature. Can you do something about that?" (I did, but it was a huge
battle with entrenched programming attitudes and people (used to
bullshitting their know-nothing managers) telling me it couldn't be done,
until I introduced them to AFP and wrote a sample program that did it.)
As time passed it seemed that mainframe programming would stay in upper
case, while the rest of the world on networked systems became offended by
it... ("there's no need to SHOUT!")
Mainframe languages such as COBOL became available on workstations and you
could easily code in mixed case if you wanted to.
This led to some sites implementing standards that utilized this capability
(like reserved words being in upper case and user names in lower). As time
passed other languages started to replace COBOL and the "conventions" for
these languages (like CamelCase) spilled over.
With all the choice that is available today, what you use will depend on
your personal style preferences and the site standards where you work.
For myself, I don't use only upper case in COBOL any more because I find
mixed case easier to read. I like CamelCase for user variables as it means
there is no need to use hyphens, and hyphens can cause grief under some
circumstances (an immediate one that comes to mind is when you write COM
components in COBOL and the compiler generates ODL for the Typelib;
hyphenated names will crash and burn...CamelCase is safe)
If you have the latitude to decide what you will use, then these are the
considerations I would recommend.
1. Use what is easily readable.
2. Be consistent. (Don't change the way you write datanames, for example,
within a program. with some in upper, some hyphenated some in CamelCase and
so on.)
3. Don't assign significance to the format of an element. (Of course it's a
File Name; can't you see the first 2 letters of the name are in
capitals?...")
I have no idea what snake_case is and I don't think I want to know... :-)
Pete.
--
"I used to write COBOL...now I can do anything."