comp.lang.ada
 help / color / mirror / Atom feed
From: "John G. Volan" <johnvolan@sprintmail.com>
Subject: Re: Warning: Religious naming convention discussion :-) [was: assign help!!]
Date: 1997/05/16
Date: 1997-05-16T00:00:00+00:00	[thread overview]
Message-ID: <337D02FE.352C@sprintmail.com> (raw)
In-Reply-To: 5li577$ur4@castor.cca.rockwell.com


Wayne Magor wrote:
> 
> We
> are already deluged with so many concepts, classes, and structures that
> we don't need to clutter things by naming unimportant items.  

This is a curious statement. There are very few things that can be
declared anonymously in Ada.  Generally, if you're declaring it, you
have to give it _some_ identifier.  How do you propose to get away with
_not_ naming something?  :-)

Well, if what you really meant was that you want to give some things
cryptic short names, in an effort to reduce the client's mental overload
in dealing with the complexity of your software, I'd say you're fooling
yourself -- at best, that's a bandaid approach to complexity.

If you want to reduce the number of details that a user has to
understand, use _abstraction_.  Wrap the darn thing in a package.  Wrap
the types up as private types.  Hide the more arcane details in the
body/private part.  Provide a streamlined interface.  Reduce coupling,
increase cohesion.

Yada, yada, yada... how often is this litany professed, yet never
_really_ understood, and carried out? :-)

> Using long names too often can actually make code *harder* to read.
...
> The reader's
> attention should be focused on what is important.  Those are what deserve
> good (possibly long) names.

Names don't have to be "long" to be "good."  The shorter the better, I
say -- within limits, and for me those limits are English.  There's an
art to picking short, but meaningful names. But there's still the
problem of distributing the same short meaningful name to several
program entities that all "want" that same name. Some kind of systematic
"noise" has to be attached to get different identifiers.

If you're saying that this "noise" should be shortened to the bare
minimum, at all costs, well okay, I'll buy that.  Maybe you'd prefer:

Project Convention: "_T" shall be the universal type-marking suffix

   type Target_T is ... 
   -- a "target" is the weapon system's hypothesis of some 
   -- real object flying out there
   procedure Create (Target : in out Target_T);
   procedure Assess_Threat (Target : in out Target_T);
   procedure Engage_Attack (Target : in out Target_T);
   ...

   type Track_T is ...
   -- a "track" is a sensor phenomenon; several tracks might be
   -- associated with the same hypothesized target
   procedure Create (Track : in out Track_T);
   procedure Update (Track : in out Track_T);

As opposed to the barbarous:

   type Target is ... 
   -- a "target" is the weapon system's hypothesis of some 
   -- real object flying out there
   procedure Create (Trg : in out Target); -- Abe wrote this
   procedure Assess_Threat (Targ : in out Target); -- Becky wrote this
   procedure Engage_Attack (Tgt : in out Target); -- Chris wrote that
   ...

   type Track is ...
   -- a "track" is a sensor phenomenon; several tracks might be
   -- associated with the same hypothesized target
   procedure Create (Trk : in out Track); -- Abe wrote this
   procedure Update (Trac : in out Track); -- Becky wrote that
   
Or the truly horrendous, but all too tempting:

   type Target is ... 
   -- a "target" is the weapon system's hypothesis of some 
   -- real object flying out there
   procedure Create (T : in out Target);
   procedure Assess_Threat (T : in out Target);
   procedure Engage_Attack (T : in out Target);
   ...

   type Track is ...
   -- a "track" is a sensor phenomenon; several tracks might be
   -- associated with the same hypothesized target
   procedure Create (T : in out Track);
   procedure Update (T : in out Track);

At what point will our pour befuddled maintenance engineer start
confusing "T" for a Track with "T" for a Target?

------------------------------------------------------------------------
Internet.Usenet.Put_Signature 
  (Name => "John G. Volan",  Home_Email => "johnvolan@sprintmail.com",
   Slogan => "Ada95: The World's *FIRST* International-Standard OOPL",
   Disclaimer => "These opinions were never defined, so using them " & 
     "would be erroneous...or is that just nondeterministic now? :-) ");
------------------------------------------------------------------------




  reply	other threads:[~1997-05-16  0:00 UTC|newest]

Thread overview: 103+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-05-05  0:00 assign help!! Ivan Gou
1997-05-06  0:00 ` Michael F Brenner
1997-05-07  0:00   ` Charles H. Sampson
1997-05-08  0:00     ` Warning: Religious naming convention discussion :-) [was: assign help!!] John G. Volan
1997-05-09  0:00       ` Kevin Cline
1997-05-09  0:00         ` John G. Volan
1997-05-09  0:00       ` Jay Martin
1997-05-09  0:00         ` John G. Volan
1997-05-09  0:00         ` Jeff Carter
1997-05-09  0:00           ` John G. Volan
1997-05-10  0:00             ` Robert Dewar
1997-05-10  0:00               ` John G. Volan
1997-05-11  0:00                 ` Robert Dewar
1997-05-12  0:00                   ` John G. Volan
1997-05-12  0:00                   ` Robert I. Eachus
1997-05-13  0:00                     ` John G. Volan
1997-05-13  0:00                     ` Robert Dewar
1997-05-16  0:00                       ` Robert I. Eachus
1997-05-17  0:00                         ` Robert Dewar
1997-05-11  0:00               ` Kevin Cline
1997-05-11  0:00                 ` Robert Dewar
1997-05-12  0:00                   ` John G. Volan
1997-05-12  0:00                     ` Robert Dewar
1997-05-16  0:00                 ` Wayne Magor
1997-05-16  0:00                   ` John G. Volan [this message]
1997-05-16  0:00                   ` Robert Dewar
1997-05-18  0:00                     ` Nick Roberts
1997-05-20  0:00                     ` naming convention discussion Peter Hermann
1997-05-14  0:00               ` Warning: Religious naming convention discussion :-) [was: assign help!!] Ben Brosgol
1997-05-14  0:00                 ` naming convention: trailing underscore Peter Hermann
1997-05-14  0:00                   ` John G. Volan
1997-05-15  0:00                   ` Michael F Brenner
     [not found]                 ` <dewar.863717431@merv>
1997-05-16  0:00                   ` Warning: Religious naming convention discussion :-) [was: assign help!!] Robert A Duff
1997-05-18  0:00                     ` Underscores in identifiers (was: Warning: Religious naming convention discussion :-) Ben Brosgol
1997-05-16  0:00                   ` naming convention discussion Peter Hermann
1997-05-16  0:00                     ` Robert Dewar
1997-05-20  0:00                       ` Peter Hermann
1997-05-17  0:00                   ` Warning: Religious naming convention discussion :-) [was: assign help!!] Arthur Schwarz
1997-05-17  0:00                     ` Robert Dewar
1997-05-17  0:00                       ` John G. Volan
1997-05-18  0:00                         ` Andrew Dunstan
1997-05-18  0:00                           ` Nick Roberts
1997-05-19  0:00                             ` John G. Volan
1997-05-19  0:00                             ` John G. Volan
1997-05-10  0:00             ` Kaz Kylheku
1997-05-10  0:00               ` John G. Volan
1997-05-10  0:00             ` Aaron Metzger
1997-05-11  0:00               ` Robert Dewar
1997-05-11  0:00                 ` Robert A Duff
1997-05-12  0:00                   ` Robert Dewar
1997-05-12  0:00                     ` Robert A Duff
1997-05-12  0:00                       ` Robert Dewar
1997-05-13  0:00                         ` David L Brown
1997-05-13  0:00                           ` W. Wesley Groleau (Wes)
1997-05-14  0:00                           ` Robert Dewar
1997-05-13  0:00                         ` Robert A Duff
1997-05-13  0:00                           ` Robert Dewar
1997-05-14  0:00                             ` Ole-Hjalmar Kristensen FOU.TD/DELAB
1997-05-13  0:00                           ` Kaz Kylheku
1997-05-14  0:00                             ` Kevin Cline
1997-05-14  0:00                               ` Robert Dewar
1997-05-14  0:00                             ` Robert A Duff
1997-05-11  0:00                 ` John G. Volan
1997-05-12  0:00                 ` Kaz Kylheku
1997-05-11  0:00               ` Simon Wright
1997-05-12  0:00               ` John G. Volan
1997-05-12  0:00             ` W. Wesley Groleau (Wes)
1997-05-12  0:00               ` John G. Volan
1997-05-13  0:00                 ` W. Wesley Groleau (Wes)
1997-05-13  0:00                   ` John G. Volan
1997-05-14  0:00                     ` naming convention discussion Peter Hermann
1997-05-14  0:00                       ` John G. Volan
1997-05-14  0:00                         ` Peter Hermann
1997-05-14  0:00                           ` John G. Volan
1997-05-15  0:00                             ` Peter Hermann
1997-05-15  0:00                           ` W. Wesley Groleau (Wes)
1997-05-14  0:00                     ` Warning: Religious naming convention discussion :-) [was: assign help!!] Do-While Jones
1997-05-14  0:00                       ` John G. Volan
1997-05-14  0:00                         ` John G. Volan
1997-05-15  0:00                         ` Tangent to Religious naming convention discussion W. Wesley Groleau (Wes)
1997-05-15  0:00                           ` John G. Volan
1997-05-14  0:00                       ` Warning: Religious naming convention discussion :-) [was: assign help!!] Stephen Leake
1997-05-12  0:00             ` Jeff Carter
1997-05-12  0:00               ` John G. Volan
1997-05-09  0:00           ` John G. Volan
1997-05-10  0:00           ` Robert Dewar
1997-05-10  0:00             ` John G. Volan
1997-05-11  0:00               ` Robert Dewar
1997-05-12  0:00                 ` John G. Volan
1997-05-12  0:00               ` W. Wesley Groleau (Wes)
1997-05-12  0:00             ` W. Wesley Groleau (Wes)
1997-05-12  0:00               ` John G. Volan
1997-05-11  0:00           ` Doug Smith
1997-05-12  0:00           ` Tom Moran
1997-05-16  0:00           ` Wayne Magor
1997-05-16  0:00             ` John G. Volan
1997-05-17  0:00             ` Kevin Cline
1997-05-19  0:00               ` Doug Smith
1997-05-12  0:00       ` W. Wesley Groleau (Wes)
1997-05-12  0:00         ` John G. Volan
1997-05-12  0:00         ` John G. Volan
1997-05-10  0:00     ` assign help!! Simon Wright
1997-05-14  0:00       ` Nick Roberts
replies disabled

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