comp.lang.ada
 help / color / mirror / Atom feed
From: "Beard, Frank" <beardf@spawar.navy.mil>
To: "'comp.lang.ada@ada.eu.org'" <comp.lang.ada@ada.eu.org>
Subject: RE: constant string array
Date: Tue, 12 Dec 2000 21:55:40 -0500
Date: 2000-12-12T21:55:40-05:00	[thread overview]
Message-ID: <B6A1A9B09E52D31183ED00A0C9E0888C469941@nctswashxchg.nctswash.navy.mil> (raw)

-----Original Message-----
From: Robert Dewar [mailto:robert_dewar@my-deja.com]

>> As in "if () then", no matter what "()" contained.

>Well the () are useless noise REGARDLESS of what they enclose
>since there is no precedence issues etc in this case.

What case?  You don't even know what case I'm talking 
about.  If () contains, "a * b + c", does it now deal
with precedence.  You seem to think I'm talking about
simple cases here.  I'm talking about all cases.
For consistency, the decision was made, not by me if I
haven't made that clear yet, to use parens in all cases.

>> They wanted consistency and it wasn't worth arguing,
>> because "if (success) then" is no harder to read than
>> "if success then"
>
>There is no more justification for this than a silly rule
>that requires all right hand sides to be in parentheses.
>The argument could equally well be that
>
>   a := (success);
>
>is no harder to read then
>
>   a := success;

Wrong!  Because we consistently code:

   a := success;

not 

   a:= (success);

>As for the use-them, don't-use-them, who-cares, philosophy,
>I find this a very sloppy view to the important issue of
>coding style consistency.

Consistency is exactly what I'm talking about.

I'm amazed how your focus goes narrow to broad in almost direct
contrast to the context I'm addressing.  Above you seem
to think I'm talking about the simple cases, and here you seem
to think I'm talking about all cases.  When I said "use-them,
don't-use them, who-cares", was in the specific context of the
specific "if success then" versus "if (success) then" case
that was discussed in that e-mail.

As far as consistency, it seems to me that you are the one being
inconsistent.  In one case you say don't use parens in an "if"
statement, and in another case you say do use parens in an "if"
statement.

If you always use parens in an "if" statement, you are being
consistent.  If you use them in some "if" statements and not
in others you are being inconsistent.  Unless of course you
extend the definition of consistency to "in these cases use
parens in "if" statements, but in these cases don't".  Then
you start hitting the gray areas as to when the statement
becomes complex enough to warrant parens, and who makes that
decision.  Who is it clear to, and who is it not.

And to make sure we're on the same plane, this entire e-mail is
in the context of conditional statements such as "if", "while",
"exit when", etc., not in assignment statements and such.
Assignment statements were miraculously left to "use parens
where they add clarity".

I understand what you are saying Robert, I really do.  But we
are talking about differences in style guides.  And we code
consistently to ours.  I don't even remember what composite
they used to come up with our style guide.  It's been seven
years now.  All I know is it goes to the specifics of what
the conditional statements of "if", "while", etc. should look
like.

The one constant over the years has been that each project
I've been on has a different Ada style guide.  I haven't
seen the Dewar Style Guide yet.

If you don't like it, take it up with the Navy.  Of course,
you can only take it up with my branch of the Navy.  Let's
not even talk about the differences between Army, Navy, 
Air Force, and Marines.

Frank




         reply	other threads:[~2000-12-13  2:55 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <910u3p$v9j$1@nnrp1.deja.com>
     [not found] ` <slrn9383g6.coa.randhol+abuse@kiuk0156.chembio.ntnu.no>
     [not found]   ` <9138e5$o6a$1@nnrp1.deja.com>
2000-12-11 19:34     ` constant string array Robert Dewar
2000-12-11 21:41 ` Pascal Obry
2000-12-12  2:54   ` Robert Dewar
2000-12-12  2:56   ` Robert Dewar
     [not found] ` <3A3445A8.8FC404D5@acm.org>
     [not found]   ` <912ut9$fga$1@nnrp1.deja.com>
     [not found]     ` <9132ng$j10$1@nnrp1.deja.com>
2000-12-11 19:39       ` Robert Dewar
2000-12-12  2:31     ` Ken Garlington
2000-12-12  2:53       ` Robert Dewar
2000-12-12  4:39         ` Ken Garlington
2000-12-12  4:56     ` Jeff Carter
2000-12-12 20:57       ` Beard, Frank
2000-12-12 23:05         ` Jeff Carter
2000-12-13  0:37           ` Robert Dewar
2000-12-13  0:36         ` Robert Dewar
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 [this message]
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
2000-12-15 18:41 ` constant string array Freelancer
replies disabled

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