comp.lang.ada
 help / color / mirror / Atom feed
From: John English <je@brighton.ac.uk>
Subject: Re: Style: always declare subrountines?
Date: Tue, 03 Dec 2002 11:15:07 +0000
Date: 2002-12-03T11:14:28+00:00	[thread overview]
Message-ID: <3DEC923B.7D210577@brighton.ac.uk> (raw)
In-Reply-To: slrnauc4cn.gm.lutz@taranis.iks-jena.de

Lutz Donnerhacke wrote:
> 
> * John English wrote:
> > accessed from the body of a public package. What would be nice to
> > be able to do sometimes is:
> >
> >   with P.Implementation;
> >   package P.Public is
> >     type T is private;
> >     ...
> >   private
> >     type T is
> >       record
> >         X : P.Implementation.Stuff;
> >       end record;
> >   end P.Public;
> >
> > Unfortunately P.Implementation can't be a private package here.
> 
> How should the P.Public user know how an element of type T has to be
> allocated? If you only change P.Implementation, the body of P.Public has to
> be recompiled, but not the parts depending on P.Public only.

I'm not sure I understand your point here. If P.Implementation is a
public package, this is legal Ada 95. If it's a private package, it
isn't. And of course, if P.Implementation changes, P.Public has to
be recompiled (because the size of P.Implementation.Stuff might have
changed) and clients of P.Public will therefore have to be recompiled
(because the size of P.Public.T might have changed). Or are you talking
about something different to this?

-----------------------------------------------------------------
 John English              | mailto:je@brighton.ac.uk
 Senior Lecturer           | http://www.it.bton.ac.uk/staff/je
 Dept. of Computing        | ** NON-PROFIT CD FOR CS STUDENTS **
 University of Brighton    |    -- see http://burks.bton.ac.uk
-----------------------------------------------------------------



  reply	other threads:[~2002-12-03 11:15 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 [this message]
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
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