comp.lang.ada
 help / color / mirror / Atom feed
From: dennison@telepath.com (Ted Dennison)
Subject: Re: with and use
Date: 10 Jul 2002 12:17:48 -0700
Date: 2002-07-10T19:17:49+00:00	[thread overview]
Message-ID: <4519e058.0207101117.7127665b@posting.google.com> (raw)
In-Reply-To: aghg1g$r9b$1@s1.read.news.oleane.net

"Jean-Pierre Rosen" <rosen@adalog.fr> wrote in message news:<aghg1g$r9b$1@s1.read.news.oleane.net>...
> "David Rasmussen" <pinkfloydhomer@yahoo.com> a �crit dans le message news:
> > So with corresponds roughly to an #include of some header file that
> > defines prototypes etc. for some other compilation unit in C++, and use
> > corresponds roughly to "using namespace Whatever", assuming that the
> > things included were in a seperate namespace?
> Roughly :-)

Yeah, in the same way that a hacksaw roughly corresponds to a
chainsaw: You generally use them for the same kinds of tasks, but
thinking of them as the *exact* same thing can be hazardous to your
health.


> > "with" and only appear at the top of a unit. Where can "use" appear?
> >
> At any place a declaration can appear, and like any declaration, its effects 
> extends from where it is declared to the corresponding
> "end". In addition, it can also appear in a context clause.

The use clause is very contraversial, as it effectivly flattens a
namespace that was (possibly) designed to be hierarchal. I generally
suggest that beginners avoid the "use" clause (although not "use
type"). Practice a while using full dot notation until you are
competent enough with Ada to intelligently decide where you stand on
the issue.



  reply	other threads:[~2002-07-10 19:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-10 13:00 with and use David Rasmussen
2002-07-10 13:25 ` Jean-Pierre Rosen
2002-07-10 13:45   ` David Rasmussen
2002-07-10 14:24     ` Jean-Pierre Rosen
2002-07-10 19:17       ` Ted Dennison [this message]
2002-07-10 17:18     ` Jeffrey D. Cherry
  -- strict thread matches above, loose matches on Subject: below --
2002-07-10 17:20 Gautier direct_replies_not_read
replies disabled

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