comp.lang.ada
 help / color / mirror / Atom feed
From: Vincent Marciante <INALID_EXCEPT_FOR_marciant@earthlink.net>
Subject: Re: "private with" proposal
Date: Tue, 03 Dec 2002 05:37:11 GMT
Date: 2002-12-03T05:37:11+00:00	[thread overview]
Message-ID: <3DEC42E0.407B@earthlink.net> (raw)
In-Reply-To: ulm381dvx.fsf@nasa.gov

Stephen Leake wrote:
 
> 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?

Discussing in the same AI as the one pertaining to
visability _within_ hierarchies confuses to issue.
It would be better for its (added syntax) added value
to be justified as clearly distict from the current AI
because that way it is clearly seen as being an issue
that could have been raised even with Ada 83 which did
not have unit hierarchies.  If it _was_ something that
was considered an rejected for Ada 83 then it would be
good to discuss what ha changed now that increases it
value to the point of acceptance now.

I think other issues (my "favorite" being reemergence of
private "=" in generics) are much more important to 
be solved than adding "documentation" 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.

I'm not convinced that an extra degree of allowed visibility 
designations is justified.  i think that hierarchies can be 
arranged so that design decisions can not be broken unless a 
unit that would otherwise _not_ have been changed ends up 
being changed.  With "with private" it would mearly be that
a unit that was being changed during maintanence was changed
inapropriately:  How would the maintainer know that some unit
that was "with privated" (Oo! I think I just coined a really 
good one) was "with privated" and not simply "withed" due to
a design architecture decision and not simply because the 
original author of the unit realized that it was only used in
the private part.  Would one then have rules like "Don't 
'with private' unless its a real design architecure decision" :^
 
> 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).

I'll try to find that note...  Okay, just (re)read it.
Although I'm not yet sure about the need for the extra
syntax within the generic part, I seems to me that even
in this case, it would still _not_ be necessary in the
context clause.  I'll think about your example an post
again if I come to any realizations regarding within the
generic part. 

-- 
Vinny



  reply	other threads:[~2002-12-03  5:37 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
2002-12-03  5:37         ` Vincent Marciante [this message]
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