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=-0.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-lcc!mordor!styx!ames!ucbcad!ucbvax!SEI.CMU.EDU!firth From: firth@SEI.CMU.EDU Newsgroups: comp.lang.ada Subject: Upper and Lower case Message-ID: <8701051344.AA11631@bd.sei.cmu.edu> Date: Mon, 5-Jan-87 08:44:48 EST Article-I.D.: bd.8701051344.AA11631 Posted: Mon Jan 5 08:44:48 1987 Date-Received: Mon, 5-Jan-87 21:50:03 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: The ARPA Internet List-Id: Mike Linnig asks how the LRM authors would have represented Ada using only one type font and two letter cases. The common style adopted internally by all the LRM authors was to put Ada keywords in lower case and identifiers in upper case: package KEY_MANAGER is type KEY is private; NULL_KEY : constant KEY; ... end KEY_MANAGER; This style agreed with the prejudices of some of us, but was objectionable to others of us; however, the benefits of a common style clearly outweighed any subjective feelings. The reasons for this style were (a) Keywords and identifiers should be clearly distinguished, eg by more than just capitalisation. (b) Identifiers are more important - you need to read them and understand their natural-language meaning. Keywords should be unobtrusive. (c) When discussing Ada, it is helpful to use upper-case for identifiers, since then you can use them in any explanatory text without typographical change: "Outside of the package KEY_MANAGER, the operations available for objects of type KEY..." [RM 7.4.2(14)] When deciding on fonts for the LRM, we retained upper-case roman for the identifiers, but followed the Algol tradition of using lower-case bold for the keywords. This was because (a) It made the examples look better (b) We could now also embed keywords in explanatory text without extra typopgraphy: "The declared object is a @i(constant) if the reserved word @b(constant) appears in the object declaration..." Note that the italicised "constant" is an english word being emphasised; the bold "constant" is the Ada keyword. [RM 3.2.1(2)] When designing the Alsys "Lessons on Ada", we tried to use colour as well as case to distinguish keywords and identifiers. Robert Firth PS: should you care, my own preference is the opposite of the above: keywords in upper case and identifiers in lower case. With a break character ('_') you don't need internal upper-case letters.