comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <Stephen.A.Leake@nasa.gov>
Subject: Re: "private with" proposal
Date: 02 Dec 2002 13:20:34 -0500
Date: 2002-12-02T18:31:57+00:00	[thread overview]
Message-ID: <ulm381dvx.fsf@nasa.gov> (raw)
In-Reply-To: 3DE66447.2D6@earthlink.net

Vincent Marciante <INALID_EXCEPT_FOR_marciant@earthlink.net> writes:

> "with private" is a proposed addition to Ada; see 
> http://www.ada-auth.org/cgi-bin/cvsweb.cgi/AIs/AI-00262.TXT?rev=1.13
> 
> I do not understand why the extra syntax (adding "private" to
> the context clause) is necessary.  Can't the rules be simply
> be changed as outlined in the proposal?  If compilers at this 
> time already do enough to recognize withing a private unit 
> in a public spec couldn't they be made to allow usage of withed 
> private units only in the private part (and body)?

You are correct, the "extra syntax" of "private" in the context clause
is not strictly necessary; the compiler and reader could figure out
what's going on.

But what is the downside of having the extra syntax? The syntax alone
is a trivial addition to the compiler; the semantics is more complex.

The upside of the extra syntax is significant; the compiler can tell
if some later maintenance code breaks a design decision; the reader
can tell that package "foo" is implementation only, and not part of
the visible spec.

So i'd prefer to keep the "with private".

In addition, there are some cases with generics where it really is
necessary, to keep the generic contract. I posted a note about that
here a while back (and to the ARG, as well).

-- 
-- Stephe



  parent reply	other threads:[~2002-12-02 18:20 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-09  6:39 Style: always declare subrountines? Victor Porton
2002-11-09 11:09 ` sk
2002-11-09 12:34 ` Victor Porton
2002-11-09 14:34   ` Jim Rogers
2002-11-09 14:53   ` sk
2002-11-09 15:36 ` Robert A Duff
2002-11-09 16:16 ` Frank J. Lhota
2002-11-09 16:28 ` chris.danx
2002-11-09 18:36 ` Simon Wright
2002-11-12 17:31 ` Stephen Leake
2002-11-18  1:52 ` ;Re: " Richard Riehle
2002-11-28 10:32   ` John English
2002-11-28 12:52     ` Lutz Donnerhacke
2002-12-03 11:15       ` John English
2002-12-03 12:22         ` Lutz Donnerhacke
2002-12-03 13:11           ` John English
2002-12-03 14:31             ` Robert A Duff
2002-12-03 14:41               ` Lutz Donnerhacke
2002-11-28 17:49     ` Vincent Marciante
2002-12-03 11:09       ` John English
2002-11-28 18:45     ` "private with" proposal Vincent Marciante
2002-11-28 20:12       ` David C. Hoos, Sr.
2002-11-29  4:28         ` Vincent Marciante
2002-12-01  1:00           ` Dale Stanbrough
2002-12-02 18:20       ` Stephen Leake [this message]
2002-12-03  5:37         ` Vincent Marciante
2002-12-03 19:24           ` Randy Brukardt
2002-12-04  3:52             ` Vincent Marciante
replies disabled

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