comp.lang.ada
 help / color / mirror / Atom feed
From: "Ken Garlington" <Ken.Garlington@computer.org>
Subject: Re: Bad coding standards
Date: Sat, 16 Dec 2000 04:31:48 GMT
Date: 2000-12-16T04:31:48+00:00	[thread overview]
Message-ID: <UeC_5.8971$bw.862965@news.flash.net> (raw)
In-Reply-To: 3A3A8272.30052FAD@mtws.visicom.com


"Wayne Lydecker" <wayne@mtws.visicom.com> wrote in message
news:3A3A8272.30052FAD@mtws.visicom.com...
: "Charles H. Sampson" wrote:
: >
: > David Emery <emery@mitre.org> wrote:
: >
: >      Actually, I find this an acceptable compromise between my preferred
: > style of using the use clause and the usual style of requiring fully
: > qualified names.  For me, qualifying everything with package names in-
: > troduces a tremendous amount of clutter, particularly if the package
: > names are long, for the occasional payoff when looking up the name is
: > necessary.  Using the two- or three-letter rename at least reduces that
: > clutter to manageable proportions.  If the abbreviations have some dis-
: > tinguishing characteristic, such as being all upper case, then your eye
: > can skip across them quite easily.  Standard, project-wide, renames are
: > helpful too, but that might not be practical in monstrous projects that
: > have hundreds of packages.
: >
: >      I don't understand the point of the rename in the package specifi-
: > cation.
: >
: >                                 Charlie
: >
: > --
: >      To get my correct email address, replace the "claveman" by
: > "csampson" in my fake (anti-spam) address.
:
: What we do at our company is make renames for each operator that we
: need to import. e.g. (pulled randomly from our code):
:
:   function "*"(L:Measurements.Distance_Type; R:Measurements.Distance_Type)
:     return Measurements.Distance_Type renames Measurements."*";
:
: That way we can use the "*" inline without the messy syntax.  For
: instance, we can write:
:
:   A := B * C;
:
: instead of:
:
:   A := Measurements."*"(A, B);
:
: For complex statements, the renames really help.

If you're using Ada 95, you should definitely consider "use type" as an
alternative. Renaming a set of operators has proven to be so error-prone in
my experience, with the error so unlikely to be detected until run-time,
that I hope no one uses this routinely!

:  As far as the TLAs
: (three letter acronyms), we used to do that all over our code.  Things
: got so bad though that we had to use acronyms that didn't even match
: what we were trying to rename because it was already taken by another
: renamed package.  What would be nifty would be to allow a package spec
: define its own "approved" renames of the package that other packages
: would be allowed to use.  I'm sure I'll hear immediately why it's not
: a good idea though ;-)
:
: -- Wayne.





  reply	other threads:[~2000-12-16  4:31 UTC|newest]

Thread overview: 75+ 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
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 [this message]
2000-12-16 11:36                           ` Robert Dewar
2000-12-15 21:36                         ` tmoran
2000-12-15 18:41 ` constant string array Freelancer
2000-12-13 22:23 Bad coding standards 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 
  -- strict thread matches above, loose matches on Subject: below --
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-15  5:00 Beard, Frank
2000-12-15 14:14 ` Ken Garlington
2000-12-16  1:28 ` Robert Dewar
2000-12-18 20:00 ` Robert L. Spooner
2000-12-19 17:46 Beard, Frank
replies disabled

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