comp.lang.ada
 help / color / mirror / Atom feed
From: "Mark Lundquist" <mark@rational.com>
Subject: Re: Ada95 tutorials with sample code.
Date: Thu, 08 Mar 2001 00:05:17 GMT
Date: 2001-03-08T00:05:17+00:00	[thread overview]
Message-ID: <11Ap6.524616$U46.15717819@news1.sttls1.wa.home.com> (raw)
In-Reply-To: 3AA5E92D.8446E7AB@emw.ericsson.se

Nice recap!

Sven Nilsson <emwsvni@emw.ericsson.se> wrote in message
news:3AA5E92D.8446E7AB@emw.ericsson.se...
> Howdy
>
> I'm replying to my own entry here to try and recap some of the things
> thats been said. No flaming at all as far as I can see, thank you very
> much people!

I think this one has been flamed over so many times, everybody is just
flamed out :-)

>
> Most people seem to agree that the use-clause can be a dangerous thing,

I would not call it "danger".  But I know what people mean who say that.

Ultimately, there is no right answer to this.  The reason is that what is
signal to me may be noise to you, and vice-versa.  That's the paradox of
understandability: there are many classes of "readers" of code (familiarity
level perhaps being the most important classification).

Some packages are clearly written with the idea that clients "use" them, as
evinced by the names chosen for declarations in the package (a classic
example would be something like Ada.Strings.Unbounded).  The idiom is that
the name of the abstraction gets built in to identifier names instead of
just being left in the package name, so you end up with
"To_Unbounded_String" instead of something like "Create".  I think the right
guideline is, when you reference a package like this, "use" it as it was
intended. The author wrote it in such a way that you should have no trouble
figuring out where things are declared (and when in doubt, you can still use
the qualfied name even though the package is on the "use" clause).  Adhering
to a "no use" rule for packages like this just seems silly.

That said, I generally prefer not to write packages in the "meant to be
use'd" style.  Which does not mean that I never "use" those packages!  I
often do (but as you and others pointed out, not necessarily in the global
use clause).

Mark Lundquist
Rational Software






  parent reply	other threads:[~2001-03-08  0:05 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-05 20:40 Ada95 tutorials with sample code mcdoobie
2001-03-05 20:58 ` Erik Sigra
2001-03-06  2:45 ` Jeffrey Carter
2001-03-06  7:12   ` Sven Nilsson
2001-03-06  8:09     ` tmoran
2001-03-06 10:38     ` David C. Hoos, Sr.
2001-03-06 10:38     ` David C. Hoos, Sr.
2001-03-06 15:06       ` Ted Dennison
2001-03-06 15:29     ` Robert A Duff
2001-03-06 16:54       ` Ted Dennison
2001-03-06 15:48     ` Ted Dennison
2001-03-06 18:19       ` Robert A Duff
2001-03-06 21:19         ` Ted Dennison
2001-03-08  6:13         ` Simon Wright
2001-03-10 16:30           ` Brian Rogoff
2001-03-06 18:20     ` Jean-Pierre Rosen
2001-03-06 20:10       ` Erik Sigra
2001-03-07 14:31         ` Simon Pilgrim
2001-03-06 21:47       ` Ted Dennison
2001-03-07  0:11     ` Robert C. Leif, Ph.D.
2001-03-07  6:44     ` Jeffrey Carter
2001-03-07  6:46     ` use-clause Anders Wirzenius
2001-03-07 18:13       ` use-clause Jean-Pierre Rosen
2001-03-07  7:54     ` Ada95 tutorials with sample code Sven Nilsson
2001-03-07 15:10       ` Marin David Condic
2001-03-08  0:05       ` Mark Lundquist [this message]
2001-03-06 15:03   ` Marin David Condic
2001-03-06 14:31 ` BSCrawford
2001-03-06 22:38   ` mcdoobie
  -- strict thread matches above, loose matches on Subject: below --
2001-03-06 23:51 Beard, Frank
2001-03-06 23:58 Beard, Frank
     [not found] <01030621102401.00302@a77>
2001-03-07 12:09 ` Mario Amado Alves
     [not found] <Pine.LNX.4.10.10103071153320.971-100000@lexis.di.fct.unl.pt>
2001-03-07 13:12 ` Erik Sigra
2001-03-07 18:07   ` Jean-Pierre Rosen
replies disabled

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