comp.lang.ada
 help / color / mirror / Atom feed
From: ok@goanna.cs.rmit.edu.au (Richard A. O'Keefe)
Subject: Re: Looking for good Ada95 book
Date: 1996/11/18
Date: 1996-11-18T00:00:00+00:00	[thread overview]
Message-ID: <56p9tl$bei$1@goanna.cs.rmit.edu.au> (raw)
In-Reply-To: 199611111501281395400@dialup81-4-2.swipnet.se


lars.farm@ite.mh.se (Lars Farm) writes:
>I have seen so many styles over the years, and so many heated debates
>about the subject that I am convinced that this is not a small point to
>the individual. Most of us have strong opinions. You obviously have. I
>do[1][2] and Michael Feldman seems to have opinions too. Interestingly
>all three of us have different opinions on what is and is not readable.
>There is no right or wrong. There is only opinion. There will never be
>consensus over an entire user community. 

"Right" and "wrong" there may not be, but there _are_ "better" and
"worse", and for a given set of intended readers, which style is
more effective for communication can be objectively measured in fairly
obvious ways.

I note that my own personal *preference* is for lower_case_identifiers,
and for many years have stubbornly refused to follow the one-time C
convention of writing macro names in upper case.  However, when I write
Ada code I *do* follow the AQ&S guidelines, my own preferences notwithstanding.
Why?  Because when I write C code, I am writing for myself, but when I write
Ada code, I am writing to be *read* by other people who have access to the
AQ&S, so following the style in the LRM and SQ&S helps me communicate with
LRM-and-AQ&S-readers.  I would certainly expect the entire Ada community to
be aware of the AQ&S guidelines:  the price is unbeatable and the advice of
_all_ kinds (not just layout and capitalisation) is *extremely* handy.  I
can think of no Ada programmers who would *not* benefit from reading the
AQ&S.

It's a bit like natural languages.  There are "prestige" dialects, and
there are perfectly good dialects which nevertheless confine you to the
comic stage.  In the Ada community, there is only one "style" dialect
which enjoys "prestige", and that is the AQ&S dialect.

Write in lower_case, and people say "oh, you're a C hacker, aren't you?"
Write in UPPER_CASE, and if you're _lucky_, people will say "didn't you
know that the revised AQ&S dropped that recommendation as a mistake;
nowadays Ada programmers use Mixed_Case".
(Put every letter in lower case except for the first in a file and the first
after each semicolon, and you will have a consistent defensible style which
will confine you to the comic stage.  I have seen this style once.)

>I have come to accept that this is the way of things. Look at C or C++.
>A much larger user base and much larger diversity of styles and naming
>conventions. This is not because of language (it requires lower case
>keywords).

Actually, it _is_ because of language.  Ada is not case sensitive, so it
is possible to use the AQ&S conventions when _using_ a package whatever
convention was used to _write_ the package.  C is case sensitive, so the
case convention used by a module author is enforced on the module user,
like it or not.

>Allow different styles, learn to live with and even appreciate
>diversity.

P.J.O'Rourke, where are you when I need you?

Touchy-feely is all very well when you are talking about works of art,
although even then, the extreme artist-centred nature of Modernism
resulted in a lot of works of little or no appeal to anyone else.

We must never lose sight of the fact that programming languages
are *not* natural languages, they are artefacts built to serve a
very specific purpose:  a programming language is supposed to help
human beings communicate algorithmic intentions to other human
beings and to machines.  Anything which helps this is good.  Anything
which harms this is bad.  The kind of diversity here harms communication,
for several reasons.  One obvious point is that if X -vs- Y is left as
a matter of stylistic variation, then X -vs- Y is not available for
*communication*.

I once worked on an assembler that was worked on by four other people at
the same time.  We were using Burroughs Algol.  For almost any line in
that file, you could tell who wrote it.  In fact, since I changed my
style during that time, you could tell _when_ parts of it were written.
People indented by 2, 3, 4, or 5.  Some people wrote "f(x)" for function
calls, some wrote "f (x)", some "f( x )", and some "f ( x )".  And so it
went.  Well, there are more effective ways of keeping track of who wrote
what (like your initials punched in the last few columns of the card).

I agree that there is room for the personal in programming, but why not
spend the creativity on writing first-class comments instead?

-- 
Mixed Member Proportional---a *great* way to vote!
Richard A. O'Keefe; http://www.cs.rmit.edu.au/%7Eok; RMIT Comp.Sci.




  parent reply	other threads:[~1996-11-18  0:00 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-10-26  0:00 Looking for good Ada95 book Lars Lundgren
1996-10-28  0:00 ` Rapicault Pascal
     [not found]   ` <01bbc5d8$a3b24e00$6a9148a6@cornerstone.mydomain.org>
1996-10-29  0:00     ` Robert Dewar
1996-10-30  0:00       ` Michael Feldman
1996-11-02  0:00         ` Robert Dewar
1996-11-03  0:00           ` Robert A Duff
1996-11-03  0:00             ` Robert Dewar
1996-11-03  0:00           ` Matthew Heaney
1996-11-04  0:00           ` Michael F Brenner
1996-11-04  0:00             ` Larry Kilgallen
1996-11-04  0:00               ` Robert Dewar
1996-11-09  0:00                 ` Michael Feldman
1996-11-11  0:00                   ` Richard A. O'Keefe
1996-11-12  0:00                     ` Mark Shaw
1996-11-06  0:00               ` James Thiele
1996-11-08  0:00                 ` Stephen Leake
1996-11-06  0:00             ` Robert A Duff
1996-11-06  0:00             ` Richard A. O'Keefe
1996-11-06  0:00               ` Robert Dewar
1996-11-04  0:00           ` Norman H. Cohen
1996-11-04  0:00             ` Jerry Petrey
1996-11-06  0:00               ` Richard A. O'Keefe
1996-11-09  0:00               ` Michael Feldman
1996-11-05  0:00             ` Silliness (was: Looking for good Ada95 book) Adam Beneschan
1996-11-06  0:00               ` Richard A. O'Keefe
1996-11-06  0:00           ` Chris Morgan
1996-11-08  0:00           ` bill.williams
1996-11-09  0:00             ` Michael Feldman
1996-11-09  0:00           ` Looking for good Ada95 book Michael Feldman
1996-11-10  0:00             ` Lars Farm
1996-11-10  0:00               ` Robert Dewar
1996-11-11  0:00                 ` Lars Farm
1996-11-12  0:00                   ` Robert Dewar
1996-11-12  0:00                     ` Lars Farm
1996-11-14  0:00                       ` Capitalization Entropy (was: Looking for good Ada95 book) Scott James
1996-11-14  0:00                         ` Robert A Duff
1996-11-18  0:00                   ` Richard A. O'Keefe [this message]
1996-11-12  0:00                 ` Looking for good Ada95 book Michael Feldman
1996-11-17  0:00                   ` Robert Dewar
1996-11-18  0:00                     ` Richard Pattis
1996-11-19  0:00                       ` Do-While Jones
1996-11-20  0:00                       ` John English
1996-11-20  0:00                         ` Larry Kilgallen
1996-11-21  0:00                       ` FerretWoman
1996-11-22  0:00                         ` Richard A. O'Keefe
1996-11-24  0:00                           ` Fergus Henderson
1996-11-18  0:00                   ` Richard A. O'Keefe
1996-11-18  0:00                     ` Michael Feldman
1996-11-20  0:00                       ` Testing teaching belief? Richard A. O'Keefe
1996-11-20  0:00                         ` Robert Dewar
1996-11-20  0:00                         ` Robert Dewar
1996-11-22  0:00                           ` Richard A. O'Keefe
1996-11-29  0:00                             ` Debora Weber-Wulff
1996-12-01  0:00                               ` Robert Dewar
1996-11-14  0:00             ` Looking for good Ada95 book Richard A. O'Keefe
1996-10-31  0:00       ` Tom Pastuszak
1996-10-28  0:00 ` Larry Kilgallen
1996-11-04  0:00 ` John English
1996-11-06  0:00 ` Wolfgang Gellerich
  -- strict thread matches above, loose matches on Subject: below --
1996-11-12  0:00 Marin David Condic, 561.796.8997, M/S 731-93
replies disabled

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