comp.lang.ada
 help / color / mirror / Atom feed
From: adaworks@netcom.com (AdaWorks)
Subject: Re: some questions re. Ada/GNAT from a C++/GCC user
Date: 1996/04/01
Date: 1996-04-01T00:00:00+00:00	[thread overview]
Message-ID: <adaworksDp753K.J7u@netcom.com> (raw)
In-Reply-To: Dp6y67.MI9@world.std.com

Robert A Duff (bobduff@world.std.com) wrote:
: In article <adaworksDp5Ct8.1wt@netcom.com>,
: AdaWorks <adaworks@netcom.com> wrote:
: >  Surely you inadvertantly omitted your smiley for the phrase, "for no
: >  good reason."

: No, I'm absolutely serious.  No joke.  I really do think the extra
: verbosity damages readability, and there's "no good reason" for it.

  HmmmmMMMMMMMMmmmm.  I thought in improved readability in large programs.
  Maybe it is just a matter of what one gets used to reading.

: Don't get me wrong -- I don't think is really a big deal.

  Agreed, if we are talking only about readability. Furthermore, I
  would guess that this is a non-problem in small programs in any
  language.  I used to find it quite useful to declare in-line variables
  in BASIC programs back in the old time-sharing days.  This programming
  style fits quite well with the pre-OO model.

: Another point: The extra verbosity also encourages people to declare
: things up at the top of the procedure, rather than at the innermost
: statement list in which they're used.  

  Yes, this is usually my preference. In fact, I am not a big advocate
  of declare blocks, whether explicitly denoted (as in Ada) or implicitly
  as in C++.  My reasons are primarily related to the difficulties in
  maintaining large-scale programs.  

  What I see happening with locally declared variables is the practice
  of nesting yet another declare block inside one that already exits
  during maintenance.  After while, the nested declare blocks begin to
  take over the design.  It really annoys me when I pick up someone's
  program and find nested declare blocks several pages long.  Imagine 
  what this would like in C++. 

  This is not to say that such declarations are never useful. They are, 
  especially when they contain only a small set of declarations and
  well-bounded behavior.  One of my favorite uses of declare blocks is
  for local renaming of deeply nested record components.  

: For example, I believe I saw a
: post from Norman Cohen a while back, saying that (in some particular
: example), the extra verbosity of declare/begin/end just isn't worth it.

  The word "verbosity" feels slightly pejorative in this discussion. 
  I sometimes like the brevity of C and C++ contructs, just as I continue
  to appreciate the simplicity of BASIC. However, for large-scale systems 
  that must be maintained over a long time-span, the more explicit wording
  required by Ada seems more appropriate. 

: So here's a case where trying to FORCE people to write good code
: backfires.  Norm Cohen is not some evil doer who revels in terse, arcane
: notations!
  
  Whew! Am I ever glad to hear that.  

  Richard Riehle
  adaworks@netcom.com

-- 

richard@adaworks.com
AdaWorks Software Engineering
Suite 27
2555 Park Boulevard
Palo Alto, CA 94306
(415) 328-1815
FAX  328-1112




  parent reply	other threads:[~1996-04-01  0:00 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-03-27  0:00 some questions re. Ada/GNAT from a C++/GCC user Bill Newman
1996-03-27  0:00 ` Robert Dewar
1996-03-28  0:00   ` Brian Rogoff
1996-03-29  0:00     ` John G. Volan
1996-03-30  0:00       ` Robert A Duff
1996-03-31  0:00         ` Robert Dewar
1996-04-01  0:00           ` Norman H. Cohen
1996-03-31  0:00         ` John G. Volan
1996-03-31  0:00           ` Mike Young
1996-04-02  0:00             ` Glenn H. Porter
1996-04-02  0:00               ` Jonas Nygren
1996-04-02  0:00               ` Robert Dewar
1996-04-03  0:00               ` Geert Bosch
1996-04-03  0:00                 ` Robert Dewar
1996-04-01  0:00           ` Robert A Duff
1996-04-03  0:00             ` Scott Leschke
1996-04-04  0:00               ` AdaWorks
1996-04-01  0:00           ` Bruce.Conroy
1996-03-30  0:00       ` Mike Young
1996-03-30  0:00         ` Ted Dennison
1996-03-31  0:00           ` Mike Young
1996-04-01  0:00       ` Norman H. Cohen
1996-04-01  0:00         ` Mike Young
1996-04-02  0:00           ` David Shochat
1996-04-02  0:00             ` Mike Young
1996-04-02  0:00           ` Norman H. Cohen
1996-04-02  0:00           ` Robert Dewar
1996-04-01  0:00         ` Robert A Duff
1996-04-01  0:00           ` Mike Young
1996-04-02  0:00             ` Robert A Duff
1996-04-02  0:00             ` Norman H. Cohen
1996-03-28  0:00   ` Norman H. Cohen
1996-03-28  0:00 ` Ted Dennison
1996-03-29  0:00   ` Adam Beneschan
1996-03-28  0:00 ` Scott Leschke
1996-03-29  0:00   ` Bill Newman
1996-03-29  0:00   ` Robert A Duff
1996-03-30  0:00     ` Richard Pitre
1996-03-30  0:00       ` Robert A Duff
1996-03-31  0:00         ` AdaWorks
1996-04-01  0:00           ` Robert A Duff
1996-04-01  0:00             ` Norman H. Cohen
1996-04-01  0:00             ` Ken Garlington
1996-04-01  0:00               ` Robert A Duff
1996-04-02  0:00                 ` Ken Garlington
1996-04-02  0:00                   ` Robert A Duff
1996-04-02  0:00                     ` Ken Garlington
1996-04-02  0:00                       ` Robert A Duff
1996-04-03  0:00                         ` David Emery
1996-04-03  0:00                         ` Ken Garlington
1996-04-09  0:00                           ` Matt Kennel
1996-04-02  0:00                 ` Tucker Taft
1996-04-02  0:00                   ` Felaco
1996-04-02  0:00                     ` Robert Dewar
1996-04-03  0:00                     ` Mark A Biggar
1996-04-01  0:00             ` AdaWorks [this message]
1996-04-01  0:00               ` Mike Young
1996-04-02  0:00                 ` Robert Dewar
1996-04-02  0:00                 ` AdaWorks
1996-04-01  0:00         ` Richard A. O'Keefe
1996-04-01  0:00           ` Robert A Duff
1996-04-01  0:00         ` Robert Dewar
1996-04-02  0:00       ` Robert I. Eachus
1996-03-29  0:00   ` Robert I. Eachus
1996-03-29  0:00 ` Robert A Duff
1996-03-29  0:00   ` Brian Rogoff
1996-04-01  0:00     ` Mark A Biggar
1996-04-01  0:00       ` Robert A Duff
1996-03-30  0:00   ` Iterators (was Re: some questions re. Ada/GNAT from a C++/GCC user) Robert I. Eachus
1996-03-31  0:00     ` Mike Young
1996-03-31  0:00       ` Fergus Henderson
     [not found]   ` <4jlj79$h1k@Nntp1.mcs.net>
1996-04-01  0:00     ` some questions re. Ada/GNAT from a C++/GCC user Robert A Duff
1996-04-02  0:00       ` Kevin Cline
1996-04-02  0:00         ` Robert A Duff
1996-04-01  0:00   ` Iterators (was Re: some questions re. Ada/GNAT from a C++/GCC user) Robert I. Eachus
1996-04-04  0:00   ` some questions re. Ada/GNAT from a C++/GCC user Jon S Anthony
1996-03-30  0:00 ` Simon Wright
1996-04-01  0:00 ` Laurent Guerby
1996-04-01  0:00   ` Robert A Duff
  -- strict thread matches above, loose matches on Subject: below --
1996-03-28  0:00 Simon Johnston
replies disabled

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