comp.lang.ada
 help / color / mirror / Atom feed
From: "Michael F. Yoder" <yoder@decada.zko.dec.com>
Subject: Re: Elimination of "use" clauses
Date: 1999/07/09
Date: 1999-07-09T00:00:00+00:00	[thread overview]
Message-ID: <3785EC89.58768067@decada.zko.dec.com> (raw)
In-Reply-To: 7m3jfk$sud$1@nnrp1.deja.com

Robert Dewar wrote:
> 
> In article <3784DC54.6463EDCA@decada.zko.dec.com>,
>   "Michael F. Yoder" <yoder@decada.zko.dec.com> wrote:
> >  It requires no
> > conscious thought or finger movement to realize that
> > 'Unb.Insert' comes
> > from the unbounded strings package.
> 
> Or perhaps unbounded trees, or perhaps the
> Universal_National_Boundaries package?

This is not a reasonable objection, because it assumes the worst
possible usage of the method.  (This *is* a strawman argument.)  If both
unbounded strings and unbounded trees were "withed" units, the
abbreviations would be something like UStr and UTree.  And
Universal_National_Boundaries would be abbreviated UNB, not Unb, if you
chose to allow acronyms.  (Using case to improve readability is
desirable even in a case-insensitive language.)

> I personally dislike these kind of package abbreviations. They
> are fine for people who know the code well, but they probably
> know where stuff is anyway.
>
> Otherwise you constantly have to be searching back to find out
> what peculiar abbreviations have been used.

This simply isn't so in my experience.  It takes at most one or two
readings of the renamings to internalize them.  If you are aware of the
method, you treat the renamings as an extension of the context clause;
and of course you should habitually read the context clause of a unit
before reading the unit.  Even if you aren't aware of the method, you
should read the global declarations at the top of a unit body.

It might be useful to this thread to give some history of the method I
discussed.  It was devised precisely because there was general
disgruntlement in our project about unreadability of code induced by
overly generous usage of use clauses.  On that project, the method
simply solved the problem.  Ever since then, I've not seen any case
where introducing such methods (or moving closer to them) hasn't
improved code readability even months or years after such changes.  To
me, the superiority of the method is an observed empirical fact; nor is
it a matter of what I am used to, since it wasn't the first method I
used.  I would certainly be willing to risk large amounts of money on
the method's being better than most others.

> [material about operators omitted]

Operators I prefer to treat as a separate question, because I believe
the best solution is different for operators and identifiers.  I have a
personal preference, but I don't feel it is clearly superior to other
methods.  With identifiers my experience has led me to a strong
preference.




  parent reply	other threads:[~1999-07-09  0:00 UTC|newest]

Thread overview: 64+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-07-01  0:00 Elimination of "use" clauses Dr. Neil C. Audsley
1999-07-01  0:00 ` czgrr
1999-07-01  0:00   ` Ted Dennison
1999-07-02  0:00     ` czgrr
1999-07-02  0:00       ` Ted Dennison
1999-07-01  0:00 ` Samuel T. Harris
1999-07-01  0:00 ` Joe Wisniewski
1999-07-02  0:00 ` Robert Dewar
1999-07-02  0:00   ` Ed Falis
1999-07-03  0:00     ` Joe Wisniewski
1999-07-03  0:00       ` Keith Thompson
1999-07-03  0:00       ` Ed Falis
1999-07-13  0:00     ` Peter Amey
1999-07-02  0:00   ` Ted Dennison
1999-07-02  0:00     ` Robert Dewar
     [not found]       ` <7ltus1$ah1@dfw-ixnews19.ix.netcom.com>
1999-07-13  0:00         ` Robert A Duff
1999-07-18  0:00           ` Richard D Riehle
1999-07-18  0:00             ` Dale Stanbrough
1999-07-20  0:00               ` Richard D Riehle
1999-07-19  0:00                 ` Brian Rogoff
1999-07-20  0:00                   ` Robert Dewar
1999-07-20  0:00                     ` Brian Rogoff
1999-07-21  0:00                       ` Ted Dennison
1999-07-21  0:00                         ` Robert Dewar
1999-07-21  0:00                         ` Robert A Duff
1999-07-21  0:00                       ` Robert Dewar
1999-07-21  0:00                         ` Brian Rogoff
1999-07-22  0:00                           ` Robert Dewar
1999-07-22  0:00                             ` Brian Rogoff
1999-07-22  0:00                           ` Robert Dewar
1999-07-22  0:00                             ` Brian Rogoff
1999-07-21  0:00                     ` Robert A Duff
1999-07-21  0:00                       ` Michael F. Yoder
1999-07-21  0:00                         ` Robert A Duff
1999-07-23  0:00                 ` Tucker Taft
1999-08-03  0:00                   ` Richard D Riehle
1999-07-20  0:00               ` David Kristola
1999-07-18  0:00             ` jerry
1999-07-19  0:00               ` Vladimir Olensky
1999-07-20  0:00               ` Richard D Riehle
1999-07-20  0:00                 ` Opaque Types (was Elimination of "use" clauses) David C. Hoos, Sr.
1999-07-20  0:00                 ` Elimination of "use" clauses jerry
1999-07-19  0:00             ` Ted Dennison
1999-07-19  0:00               ` Tucker Taft
1999-07-19  0:00                 ` Ted Dennison
1999-07-02  0:00     ` Stephen Leake
1999-07-02  0:00     ` Ed Falis
1999-07-02  0:00   ` Samuel T. Harris
1999-07-02  0:00     ` Robert Dewar
1999-07-08  0:00       ` R. Tim Coslet
1999-07-09  0:00         ` Robert Dewar
1999-07-09  0:00           ` tmoran
     [not found]       ` <7ltl2q$mog$1@nnrp1.deja.com>
1999-07-08  0:00         ` Michael F. Yoder
1999-07-09  0:00           ` Robert Dewar
1999-07-09  0:00             ` Dale Stanbrough
1999-07-12  0:00               ` Robert Dewar
1999-07-12  0:00                 ` Ted Dennison
1999-07-09  0:00             ` Michael F. Yoder [this message]
1999-07-14  0:00               ` Tucker Taft
1999-07-10  0:00             ` Simon Wright
1999-07-12  0:00               ` Robert Dewar
1999-07-09  0:00           ` Richard D Riehle
1999-07-09  0:00             ` Michael F. Yoder
1999-07-09  0:00             ` Marin David Condic
replies disabled

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