comp.lang.ada
 help / color / mirror / Atom feed
From: "Ken Garlington" <Ken.Garlington@computer.org>
Subject: Re: Bad coding standards
Date: Fri, 15 Dec 2000 14:14:34 GMT
Date: 2000-12-15T14:14:34+00:00	[thread overview]
Message-ID: <eHp_5.8559$bw.809517@news.flash.net> (raw)
In-Reply-To: B6A1A9B09E52D31183ED00A0C9E0888C469959@nctswashxchg.nctswash.navy.mil


"Beard, Frank" <beardf@spawar.navy.mil> wrote in message
news:B6A1A9B09E52D31183ED00A0C9E0888C469959@nctswashxchg.nctswash.navy.mil..
.
: -----Original Message-----
: From: Ken Garlington [mailto:Ken.Garlington@computer.org]
:
: > Because (a) that's not what it's intended to do, and (b) there are other
: > document that *are* intended for that purpose. Since Ada attempts to
: > discourage the "copy principle," it's not surprising that the ARM does
not
: > choose to be redundant with available style guides ;)
:
: Why not?   Seeing how the Ada Reference Manual is the "bible" of the Ada
: language, written by the founders (or "pillars") of the language.
Wouldn't
: it be reasonable to assume that the examples given in the reference
: manual would be written in a "good" style?

No. In fact, this practice is not limited to Ada *reference* documents.

"This quick reference guide for the Standard C programming language provides
all of the information you need to read and write programs in Standard C. It
describes all aspects of Standard C that are the same on all implementations
that conform to the standard for C. This is not a tutorial on Standard C nor
a lesson on how to write computer programs."

-- Plauger and Brodie, "Standard C." Microsoft Prcess, 1989.

 And as such, worthy of
: emulation,
: something to be followed?  You know, a reasonable guide.  What's that
: phrase?
: Oh yeah, a "style guide".
:
: Because I think it's ludicrous to assume those using the language manual,
: especially new users, wouldn't assume that the "examples" weren't a
: good style to follow.

I suppose "new users" may make all sorts of mistakes. For myself, when I
want to learn a new language, I don't normally start with the ISO standard
(assuming it exists). I get a textbook, or use an on-line resource. For
example:

http://www.adahome.com/Tutorials/Lovelace/lovelace.html

: I know later they could learn about style guides,
: but if it were another part of the standard, maybe the "Style Guide
: Annex", then we would have universal approach.  Why not?

I think your next sentence provides one reason -- why add additional work to
a process that already takes significant effort? The second reason relates
to what I would call "separation of concerns." Why mix a style guide in with
something that, within the limits of reasonableness, is supposed to
accurately specify a language? Finally, it's not clear that a style guide is
(or should be) intended to force a "universal approach." As noted in the SPC
guide: "Other guidelines presented in this book are intentionally phrased in
terms of design choices to consider. These guidelines cannot be instantiated
as hard-and-fast rules that a project must follow. For example, you should
not interpret Guidelines 6.1.1 and 6.1.2 to mean that a project is forbidden
to use tasks. Rather, these guidelines are intended to help the designer
make the tradeoffs between using protected objects and tasks, thus leading
the designer to make a more informed choice between these features."

: Many in the
: beginning didn't think we could get this many people, from different
: countries, to agree, within reason, on a programming language.

I don't know why "many" people would have felt that way. Certainly, Ada is
not the first internationally standardized language to be used widely. It's
not easy, but it's far from impossible.

: I'm not sure about the "Since Ada attempts to discourage the "copy
: principle,""
: part.  I'm not sure where that comes from.

IIRC, I first heard it in a speech given by Jean Ichbiah in Dallas in the
early 1980s. The idea is that doing manual "cut-and-paste" operations is
highly error prone. Therefore, you want a language that encourages
modularization and controlled parameterization (e.g. generics) as a more
reliable alternative.

: But, it seems to me reuse is the
: ultimate in the "copy principle" (more like condoned plagiarism), and the
: main point of the style guides (and by that I mean the style guide says
this
: is what we think is "good", do it this way).
:
: >>   "it has no impact on the operation or performance of the software,
just
: >> aesthetics."
: >
: > I might assume that the word "just" implies that aesthetics are less
: > important than operation or performance. As the ARM points out, the
design
: > of Ada is predicated in part on the idea that aesthetics are very
: important.
:
: Well, I can see where that could possibly happen.  Maybe I should
: have said "just the aesthetics".  If you look at the whole sentence:
:
: "Unless your talking about style guide issues that specify
: using "for loops" as opposed to a "slices", or using "case"
: statements instead of an "if" statements, then it has no
: impact on the operation or performance of the software, just
: aesthetics."
:
: The "just" in the sentence meant that outside the part of style
: guide that deals with structural issues, such as data structures,
: then your are left with just the aesthetic part.  I didn't mean
: to imply that I didn't think aesthetics were important, just
: subject to opinion.  If you didn't get my point in previous e-mails,
: I consider it an integral part of readability.  Unlike some who
: think readability and aesthetics form some type of dichotomy, or
: at least don't see the connection.
:
: Frank
:
:
:





  reply	other threads:[~2000-12-15 14:14 UTC|newest]

Thread overview: 56+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-15  5:00 Bad coding standards Beard, Frank
2000-12-15 14:14 ` Ken Garlington [this message]
2000-12-16  1:28 ` Robert Dewar
2000-12-18 20:00 ` Robert L. Spooner
  -- strict thread matches above, loose matches on Subject: below --
2000-12-19 17:46 Beard, Frank
2000-12-14  2:32 Beard, Frank
2000-12-14 12:19 ` Robert Dewar
2000-12-14 14:03 ` Ken Garlington
2000-12-14 20:14   ` Robert Dewar
2000-12-15  1:10     ` Ken Garlington
2000-12-18 16:09     ` Tucker Taft
2000-12-18 18:59       ` Marin David Condic
2000-12-18 22:20         ` Georg Bauhaus
2000-12-19 15:51           ` Tucker Taft
2000-12-19 16:12             ` Marin David Condic
2000-12-19 16:01           ` Robert Dewar
2000-12-19 15:49         ` Robert Dewar
2000-12-19 16:36           ` Marin David Condic
2000-12-20  1:52             ` Ken Garlington
2000-12-20 12:58               ` Marin David Condic
2000-12-20 14:27                 ` Ken Garlington
2000-12-21 23:19                   ` Marin David Condic
2001-01-03 19:49                     ` Wes Groleau
2001-01-06 19:45                       ` Lao Xiao Hai
2000-12-20 11:56             ` Mario Amado Alves
2000-12-19 18:05           ` Larry Kilgallen
2000-12-19 15:42       ` Robert Dewar
2000-12-15  0:52 ` Georg Bauhaus
2000-12-13 22:23 Beard, Frank
2000-12-13 23:56 ` Ken Garlington
2000-12-14  0:37   ` Ken Garlington
2000-12-14  4:08 ` Robert Dewar
2000-12-14 14:06   ` Ken Garlington
2000-12-14 20:15     ` Robert Dewar
2000-12-15  5:55 ` Keith 
     [not found] <910u3p$v9j$1@nnrp1.deja.com>
     [not found] ` <3A3445A8.8FC404D5@acm.org>
     [not found]   ` <912ut9$fga$1@nnrp1.deja.com>
2000-12-12  4:56     ` constant string array Jeff Carter
2000-12-12 20:57       ` Beard, Frank
2000-12-13  0:39         ` Robert Dewar
2000-12-13  2:02           ` Beard, Frank
2000-12-13  2:33             ` Robert Dewar
2000-12-13  2:55               ` Beard, Frank
2000-12-13  4:00                 ` Ken Garlington
2000-12-13 13:38                   ` Bad coding standards Marc A. Criley
2000-12-13 13:54                     ` Ken Garlington
2000-12-13 20:55                     ` David Emery
2000-12-14 13:07                       ` Robert Dewar
2000-12-14 14:21                         ` Ken Garlington
2000-12-15  0:08                           ` Wayne Magor
2000-12-15  1:40                             ` Ken Garlington
2000-12-15  3:18                         ` DuckE
2000-12-15  4:45                           ` Ed Falis
2000-12-15 15:44                           ` Robert C. Leif, Ph.D.
2000-12-15 16:34                             ` Ted Dennison
2000-12-16  6:08                               ` Robert C. Leif, Ph.D.
2000-12-16  1:16                             ` Robert Dewar
2000-12-16  1:19                             ` Robert Dewar
2000-12-17  5:49                               ` Robert C. Leif, Ph.D.
2000-12-17  8:24                                 ` Robert Dewar
2000-12-15 15:56                       ` Charles H. Sampson
2000-12-15 20:43                         ` Wayne Lydecker
2000-12-16  4:31                           ` Ken Garlington
2000-12-16 11:36                           ` Robert Dewar
2000-12-15 21:36                         ` tmoran
replies disabled

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