comp.lang.ada
 help / color / mirror / Atom feed
* Re: Ada Quality and Style Guide
@ 1992-05-09 15:52 Richard Pattis
  0 siblings, 0 replies; only message in thread
From: Richard Pattis @ 1992-05-09 15:52 UTC (permalink / raw)


I asked a question like this about 6 months ago. I'd like to summarize what
I heard before voting gets too far along.

People tend to fall into two groups: (1) Those who think reserved words should
stand out and be easy to spot because they quickly outline the key points of a
program. They cite the LRM as using boldface as confirmation of their belief.
Because boldface is not available on most terminals and listings, they
advocate using upper-case reserved words to meet the same goal. (2) Those who
think reserved words should not stand out because they distract attention from
the more important things: programmer-defined words. They cite the LRM as
using lower-case as confirmation of their belief.

Actually there seem to be three classes of Ada identifiers: reserved,
predefined, and programmer-defined. Some group reserved and predefined
together (both have default meanings, whether changable or not); others group
predefined and programmer defined together, since the programmer can define
the meaning of each (whether predefined or not).

The final question is the use of underscores and capitalization. In Pascal,
upper-case letters were the only way to signal the start of new words:
ScarCity vs. Scarcity. Some believe using underscores and upper-case is
redundant, although most would allow it in cases like People_and_Places. The
use of capitals for abbreviation and acronyms makes this the murkiest issue.

Finally, there are some other capitalization conventions I've seen that I like:
e.g., using the case of the first word to indicate whether an identifier is
local to a subprogram or not (extended to local to a package or not, when USE
is present). Such conventions may be too detailed for a general standard.

Rich

-- 
------------------------------------------------------------------------------
  Richard E. Pattis			"Programming languages are like
  Department of Computer Science	 pizzas - they come in only "too"
    and Engineering			 sizes: too big and too small."

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1992-05-09 15:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1992-05-09 15:52 Ada Quality and Style Guide Richard Pattis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox