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 ro10mr4916058pbc.6.1328922405445; Fri, 10 Feb 2012 17:06:45 -0800 (PST) MIME-Version: 1.0 Path: wr5ni10505pbc.0!nntp.google.com!news1.google.com!goblin3!goblin.stu.neva.ru!gegeweb.org!news.ecp.fr!news.jacob-sparre.dk!munin.sparre-andersen.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Convention for naming of packages Date: Fri, 10 Feb 2012 19:06:40 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <4f355230$0$21451$ba4acef3@reader.news.orange.fr> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1328922404 17525 69.95.181.76 (11 Feb 2012 01:06:44 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Sat, 11 Feb 2012 01:06:44 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Date: 2012-02-10T19:06:40-06:00 List-Id: "Pascal Obry" wrote in message news:4f355230$0$21451$ba4acef3@reader.news.orange.fr... ... > It would be awful to write: > > with Shapes; > O : Shapes.Shape; But this is exactly what Claw does, as it is best for reusable code to work well for both "use-friendly" and "use-adverse". The above is far less frequent than calls, and the alternative of "Object" for the type is actively hostile to the "use-friendly". Unless a package is only going to be used under a single style-guide (that is, within your organization), it really ought to be friendly to both approaches. (Which admittedly increases the level of difficulty for naming.) [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; It definitely makes object declarations look redundant, but doing that allows all other uses to not be redundant.] 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". We spend quite a bit of effort on designing and adopting a consistent naming for Claw, as I was convinced that naming was going to have a huge impact on the usability of the product. (And I had plenty of experience with the haphazard naming used in the Janus/Ada code base, and I didn't want to repeat that.) Randy.