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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "Jeffrey R. Carter" Newsgroups: comp.lang.ada Subject: Re: Idiomatic formatting for empty package Date: Tue, 10 Oct 2017 09:12:21 +0200 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Date: Tue, 10 Oct 2017 07:12:22 -0000 (UTC) Injection-Info: reader02.eternal-september.org; posting-host="80957929da21cd692a4db242b9e29ebe"; logging-data="14637"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18/kHHy0gvlVMNby2rYH3gpo81Ox8OhJng=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 In-Reply-To: Content-Language: en-US Cancel-Lock: sha1:HS5uDFNdikrbpWpmDHH8uz5Lous= Xref: news.eternal-september.org comp.lang.ada:48412 Date: 2017-10-10T09:12:21+02:00 List-Id: On 10/09/2017 11:45 PM, Randy Brukardt wrote: > "Jeffrey R. Carter" wrote in message >> >> For instance, see package Ada. > > John also pointed this out privately. Sorry that I missed it. Still, Ada is > not a very good example: > > (1) Ada was created after the fact to group a bunch of unrelated packages > together. One hopes that no one thinks that such a practice is a good idea! > The grouping should be of things that are related (like Ada.Strings and > Ada.Containers), and aas I noted, typically there are things that are shared > that make sense in the root package. > > (2) For instance, had the IO packages been grouped together (without all of > the other unrelated stuff), it would make sense for the IO exceptions to be > declared in that parent package. It wasn't done in Ada as the organization > of the IO libraries predates child packages. (Argubly, that should have been > done anyway in Ada 95, but it's not as obvious given the capabiliy needs.) I agree with most of what you say. I think the purpose of Ada was namespace control: Where before we had a bunch of pkgs using up names we might want to use, after we had a single hierarchy under Ada. (Of course, the Ada-83 compatibility renamings undo that.) My project naming convention is similar: Everything in project Project has a name beginning with Project. Usually there are no common declarations that would go in the parent pkg. My real reason for bringing up pkg Ada was as something for the OP's consideration. As an empty pkg spec in the ARM, it might be considered the idiomatic formatting for same. -- Jeff Carter "[I]f we should ever separate, my little plum, I want to give you one little bit of fatherly advice. ... Never give a sucker an even break." Poppy 97