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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!weretis.net!feeder4.news.weretis.net!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Reason for 'Ada.Strings.Bounded' not being declared 'pragma Pure' ? Date: Thu, 5 Dec 2013 14:17:05 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <45ccc264-b606-45d1-a766-f1d8e652212f@googlegroups.com> <52a04caa$0$6636$9b4e6d93@newsspool2.arcor-online.net> NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: loke.gir.dk 1386274627 32029 69.95.181.76 (5 Dec 2013 20:17:07 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 5 Dec 2013 20:17:07 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:17854 Date: 2013-12-05T14:17:05-06:00 List-Id: We re-analyzed all of the existing packages for Ada 2005, and changed the categorization of some of them. The details can be found in AI95-0362-1 (http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ais/ai-00362.txt). There is a listing of every predefined package in that AI. Here's the entry for Bounded strings: Ada.Strings.Bounded -- A.4.4; Preelaborate This package contains no state, no dependence on non-pure units, no other items that prevent the package from being pure, and does not declare any types that would be a problem for Annex E, so it could be declared pure. But it's large and complex, and many of the operations are not conceptually pure (they do in-place updates), so no change is recommended. This admittedly does not seem very satisfying. We didn't redo this exercise for Ada 2012, the only change we made was to make Stream_IO preelaborated so that loggers and the like can be written. (It's not practical to make the full Text_IO preelaborated [the obvious approach is not task-safe], and there was no agreement on the contents of a preelaborable subset.) I suppose you could send a request to reconsider this to Ada-Comment (but it would probably have to wait until the next Standard, whenever that is). Someone asked about Ada.Tags. The entry for it says: Ada.Tags -- 3.9; not categorized Package Tags has state, so it cannot be pure. That state is generally either set up at link-time (before elaboration) or during the elaboration of tagged types (that is, during the elaboration of other units). In either case, no complex state need be initialized at elaboration time. Thus, this package can be Preelaborated. (The "state" that is talked about here is the table of internal tag <=> external tag mappings. Distributing that could be a significant overhead.) Making it Pure is not practical. Randy. "Georg Bauhaus" wrote in message news:52a04caa$0$6636$9b4e6d93@newsspool2.arcor-online.net... > On 05.12.13 04:58, Rod Kay wrote: >> Hi all, >> >> Would anyone know the reason for this ? > > Two possible reasons, guessing: > > 1) pragma Pure being >= Ada 95, and compatibility, > > 2) an implementation may choose to use pointers internally. >