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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,c39ad3e35a7690a9 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.226.10 with SMTP id ro10mr5568443pbc.6.1328952139792; Sat, 11 Feb 2012 01:22:19 -0800 (PST) Path: wr5ni11774pbc.0!nntp.google.com!news1.google.com!eweka.nl!lightspeed.eweka.nl!feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Convention for naming of packages Date: Sat, 11 Feb 2012 09:22:18 +0000 Organization: A noiseless patient Spider Message-ID: References: <4f355230$0$21451$ba4acef3@reader.news.orange.fr> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="dFCm8HWntFqmDIilBLqEJQ"; logging-data="25551"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/nMWEjYiu21i0dVvcrImecyno7HERyEZw=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (darwin) Cancel-Lock: sha1:/IKmt3HdfD9IAAFnpNP56xNUis8= sha1:BKNVarzubTo3QvPnpuoCIgOcUZY= Content-Type: text/plain; charset=us-ascii Date: 2012-02-11T09:22:18+00:00 List-Id: "Randy Brukardt" writes: > [Note: Claw actually uses "Shape_Type" for type names, so the above > actually looks like (using a decent name for the objec): > Triangle : Shapes.Shape_Type; I feel that does rather depend on the name's scope and how many other names are declared in that scope. > One thing I neglected to mention in my last post is that under no > circumstances should the name of the type appear in (OO) subprogram > names. The object parameter to the subprogram should be named well > enough to give the content for the "use-friendly" (and if it is not, > the client has more problems than we can help them with), and the > package name will give the context for the "use-adverse". In most cases the subprogram name tells what it does, and the object parameter might just as well be called 'This'. As for the other parameters .. my style recommendations, which may seem a bit odd but were derived from experience (of others' sins!) are As a matter of style, always name parameters from the point of view of the operation's caller, not from your point of view as implementer. Try to make the names read well, especially if the caller uses named parameter association: SNTP.User.Receive_Broadcasts_Via (The_Agent => Service, Reporting_To => S_Support.Receiver'Access); Don't use long parameter names that repeat the type name. There is plenty of context available to the reader, and you make it more difficult than it need be to follow coding standards that ask for limits on line lengths. (neither parameter is of a tagged type).