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=-0.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,9983e856ed268154 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.180.96.42 with SMTP id dp10mr965063wib.2.1344010586660; Fri, 03 Aug 2012 09:16:26 -0700 (PDT) Path: q11ni23959726wiw.1!nntp.google.com!goblin1!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: Should Inline be private in the private part of a package spec? Date: Fri, 3 Aug 2012 18:15:57 +0200 Organization: cbb software GmbH Message-ID: <18hr1ac8vbkpp$.1om9x5j34m2ct.dlg@40tude.net> References: <501bd285$0$6564$9b4e6d93@newsspool4.arcor-online.net> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: 9A8bJrx4NhDLcSmbrb6AdA.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Date: 2012-08-03T18:15:57+02:00 List-Id: On Fri, 03 Aug 2012 15:30:50 +0200, Georg Bauhaus wrote: > The aspect notation of Ada 2012 lets me specify Inline as > an aspect giving a pragmatic hint to the compiler. > This hint is very near the declaration: > > package P is > > procedure Op (X : T) > with Inline; > > end P; > > > Should the readers of a package spec be bothered with hints > to the compiler if these hints address optimization, or other > aspect of how to implement a subprogram? > > The hint does not add to an understanding of what an operation > is to achieve, IMHO. This understanding is what I'd hope to > get from reading a spec. Alternatively, > > package P is > > procedure Op (X : T); > > private > pragma Inline (Op); > end P; > > still lets the reader take note of inlining, should they > be so inclined. Am I missing something? Yep. The concept of an aspect in general, not only inlining, looks suspicious. The litmus question is whether the aspect describes something functional. If it does not, it does not belong to public declarations and any declaration, probably. I doubt that anybody could argue that aspects represent anything "material" to augment the existing set "things" like operation, type, object, package (module), value. A syntax motivated hack, maybe a language design flaw, though it is too early to say right now. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de