From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,768ec7d79291ed2c X-Google-Attributes: gid103376,public From: collins@cs.wm.edu (Bob Collins) Subject: Re: IDENTIFIERS in Upper Case Date: 1997/03/27 Message-ID: #1/1 X-Deja-AN: 228711104 References: <1997Mar26.185431.12742@nosc.mil> Organization: College of William & Mary Newsgroups: comp.lang.ada Date: 1997-03-27T00:00:00+00:00 List-Id: In article <1997Mar26.185431.12742@nosc.mil>, sampson@cod.nosc.mil (Charles H. Sampson) wrote: > I've heard it said that of all the possible case conventions that > could be used in programming, the worst possible one is to require iden- > tifiers to be all upper case. (This is one of those opinions that I > agree with.) Often when I've heard this, there has been either an ac- > company statement or an implication that studies have been done showing > that this convention reduces comprehension, compared to the all-lower- > case or the initial-caps ones. Can anyone point me toward any such > study? I doesn't even have to be on the Internet. A reasonably acces- > sible journal would be fine. Many reading studies have been done for general text (not programs) that all seem to indicate that all uppercase "requires concentrated attention and is slow to decipher." (Jan White, _Graphic design for the electronic age_) One reason is the monotonous rectangularity of uppercase text. Lowercase letters differ from each other in shape and so are easier to recognize -- ascenders, descenders, and their lack provide distinctive visual patterns. Even the dot over the "i" helps to distinguish "i" from "m," "n," and "v" in handwritten text. However the Ada "hiccup" style that the otherwise impeccably brilliant Robert Dewar favors (hiccup is due to White and means the up-and-down nature of The_Quick_Brown_Fox) seems to impede reading as well, which is probably why cigarette warnings favor the hiccup style ("The Surgeon General Has Determined That ..."). Program text is probably most easily read using a proportional font, with true ascenders and descenders, and using mostly lowercase for identifiers, as in the_quick_brown_fox. Tabs can be used for lining up columns. Indeed, it might help to capitalize the first word in each statement as a visual clue: If a > b then Some_other_procedure (a, d); else B := some_other_function (a, d); end if; (P.S. I know That RD just favors a consistent style and is flexible enough to adopt any style. Consistency is good.) Bob Collins, collins@cs.wm.edu