comp.lang.ada
 help / color / mirror / Atom feed
From: eachus@spectre.mitre.org (Robert I. Eachus)
Subject: Re: Package Parts [was: Ada GC and a bunch of other stuff]
Date: 1996/02/23
Date: 1996-02-23T00:00:00+00:00	[thread overview]
Message-ID: <EACHUS.96Feb23175959@spectre.mitre.org> (raw)
In-Reply-To: NEWTNews.824443067.649.geneo@medusa.ppp.rational.com

In article <4gh2da$ffb@dayuc.dayton.saic.com> John G. Volan <John_Volan@ccmail.dayton.saic.com> writes:

  > However, regardless of whether the part-names are enumeration literals
  > or named numbers, there's something a bit unsatisfying about having to
  > declare a separate configuration package first just to house the
  > part-names, before you can actually declare the target package in its
  > various parts.  I think it would be better if a package could remain an
  > autonomous, self-contained entity, regardless of whether it happens to
  > be decomposed into multiple parts or not.

   How about:

   package Stack(Interface, Extended_Interface, Completion);

   package Stack(Interface) is...
   end Stack(Interface);

   package Stack(Extended_Interface) is...
   end  Stack(Extended_Interface);
 
   etc.

   (Lots of other good ideas that work well with this approach deleted.)

   In the GNAT library model, the one line declaration of the parts
would have to be in a separate file with a new extension, .adp?, but
other than that no problem.  Or you could make the part enumeration a
header for the first package part:

   parts(Interface, Extended_Interface, Completion);
   package Stack(Interface) is...
   end Stack(Interface);

   Making each part list all of the partitions is the third approach:

   package Stack(Interface of Interface, Extended_Interface, Completion) is
   end Stack(Interface);

   But this could lead to more hassle in maintenance.


					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...
--

					Robert I. Eachus

with Standard_Disclaimer;
use  Standard_Disclaimer;
function Message (Text: in Clever_Ideas) return Better_Ideas is...




      parent reply	other threads:[~1996-02-23  0:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <NEWTNews.824443067.649.geneo@medusa.ppp.rational.com>
1996-02-18  0:00 ` Package Parts [was: Ada GC and a bunch of other stuff] Ken & Virginia Garlington
1996-02-21  0:00   ` John G. Volan
1996-02-22  0:00   ` John G. Volan
1996-02-23  0:00     ` Robert A Duff
1996-02-22  0:00   ` John G. Volan
1996-02-23  0:00     ` Robert A Duff
1996-02-22  0:00 ` John G. Volan
1996-02-22  0:00   ` John G. Volan
1996-02-23  0:00   ` Robert A Duff
1996-02-23  0:00 ` Robert I. Eachus [this message]
replies disabled

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