From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8bb81cae35ee307f X-Google-Attributes: gid103376,public 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 Message-ID: #1/1 X-Deja-AN: 140853836 distribution: world references: organization: The Mitre Corp., Bedford, MA. newsgroups: comp.lang.ada Date: 1996-02-23T00:00:00+00:00 List-Id: In article <4gh2da$ffb@dayuc.dayton.saic.com> John G. Volan 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...