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: a07f3367d7,9983e856ed268154 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.224.188.76 with SMTP id cz12mr12594885qab.0.1344998912403; Tue, 14 Aug 2012 19:48:32 -0700 (PDT) MIME-Version: 1.0 Path: c6ni112127729qas.0!nntp.google.com!npeer02.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nrc-news.nrc.ca!goblin1!goblin.stu.neva.ru!nuzba.szn.dk!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Should Inline be private in the private part of a package spec? Date: Thu, 9 Aug 2012 17:32:12 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <501bd285$0$6564$9b4e6d93@newsspool4.arcor-online.net> <502005b6$0$9510$9b4e6d93@newsspool1.arcor-online.net> <50203ca2$0$9512$9b4e6d93@newsspool1.arcor-online.net> <5020e0e1$0$6570$9b4e6d93@newsspool3.arcor-online.net> <50211aed$0$6571$9b4e6d93@newsspool3.arcor-online.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1344551535 22451 69.95.181.76 (9 Aug 2012 22:32:15 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 9 Aug 2012 22:32:15 +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 X-Received-Bytes: 3540 Date: 2012-08-09T17:32:12-05:00 List-Id: "Georg Bauhaus" wrote in message news:50211aed$0$6571$9b4e6d93@newsspool3.arcor-online.net... ... > Premise 1: The reader is the only important person in Ada programming. > Premise 2: The reader wishes to learn from a package spec how to write > a call statement (essential knowledge: profile, contract, exceptions). Premise 2, as you've stated it here, is clearly wrong. It would be much better stated as The reader wishes to learn from a package spec whatever they need to know about using the package. That might be how to write a call, but it also might be how to write an object declaration, a type extension, an access type declaration, or one of many other possibilities. They also might want to know how to compile the program successfully, either because they want to compile the program by hand, or because they're some sort of tool. (Most of the Janus/Ada tools only read the context clause and visible part of packages; we don't want any privacy leakage and we definitely wanted to avoid reading large specifications.) Point is, that it's pretty hard to tell want a reader wants. As Vasilly said, it's very annoying to have to look all over the place to find the information you need. Moreover, having a bunch of aspects at the end of a subprogram declaration has almost no effect on its readability, because you don't need to read past the "with" unless you care about the aspects. (This is just like not reading the private part if you don't need to know something about that.) So I see no advantage to the style of putting things in the private part, and there are lots of disadvantages (hidden dependencies, hard to find the information when it is needed, hard to tell when it is missing [because omissions are much harder to find than commissions], and much more likely to run into freezing problems). Randy.