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,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:a24:104b:: with SMTP id 72mr703743ity.27.1555416693876; Tue, 16 Apr 2019 05:11:33 -0700 (PDT) X-Received: by 2002:aca:3d89:: with SMTP id k131mr21108857oia.37.1555416693490; Tue, 16 Apr 2019 05:11:33 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!fdn.fr!proxad.net!feeder1-2.proxad.net!209.85.166.216.MISMATCH!136no143751itk.0!news-out.google.com!r82ni171ita.0!nntp.google.com!136no143748itk.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Tue, 16 Apr 2019 05:11:33 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=185.34.132.4; posting-account=Srm5lQoAAAAEMX9rv2ilEKR6FDPapmSq NNTP-Posting-Host: 185.34.132.4 References: User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <1127d366-d36c-4abf-8590-4b8c0e2b5446@googlegroups.com> Subject: Re: Why can't objects be static in Ada? From: Mark Lorenzen Injection-Date: Tue, 16 Apr 2019 12:11:33 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader01.eternal-september.org comp.lang.ada:56136 Date: 2019-04-16T05:11:33-07:00 List-Id: On Tuesday, April 16, 2019 at 3:40:45 AM UTC+2, Randy Brukardt wrote: > > > > package Static is > > pragma Preelaborate; >=20 > I view this as self-inflicted, because there's no little value to pragma= =20 > Preelaborate. As I previously noted, compilers will almost always generat= e=20 > the best possible elaboration code whether or not that pragma is applied.= =20 > And regardless of C.4, not all preelaborated code can be done before load= =20 > time, so it isn't providing a benefit in forcing that sort of code, eithe= r. >=20 > It's one of the ideas where Ada tried to accomplish something, but didn't= =20 > quite succeed. Pure is like that as well, but at least it provides some= =20 > benefits for Annex E code. Preelaborate doesn't even do that. How can it be ensured that a library written in Ada does not require any el= aboration. Pragma Pure? I think that such libraries are "nice" but pragma P= ure is too restrictive for that purpose. In such cases it would be good, if= e.g. the OP's problem could be solved at compile time without any elaborat= ion. Regards, Mark L