From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a37:6113:: with SMTP id v19mr39059147qkb.333.1641400439740; Wed, 05 Jan 2022 08:33:59 -0800 (PST) X-Received: by 2002:a25:6884:: with SMTP id d126mr44060642ybc.355.1641400438136; Wed, 05 Jan 2022 08:33:58 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 5 Jan 2022 08:33:57 -0800 (PST) In-Reply-To: <546e54e7-64ba-48a5-a990-d644947992ccn@googlegroups.com> Injection-Info: google-groups.googlegroups.com; posting-host=2804:14c:4c1:8775:352d:ffd4:3db5:6282; posting-account=wgmHdgoAAAA-F7JItPEZjeXqFc0KdzEQ NNTP-Posting-Host: 2804:14c:4c1:8775:352d:ffd4:3db5:6282 References: <3b7ba153-ebf1-4b85-a1b2-3ad5aaeca11en@googlegroups.com> <546e54e7-64ba-48a5-a990-d644947992ccn@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <378bc69a-8388-4daf-b13f-523fd1defa12n@googlegroups.com> Subject: Re: Ada Pure or Preelaborate or ? in Adare_net From: Daniel Norte Moraes Injection-Date: Wed, 05 Jan 2022 16:33:59 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:63345 List-Id: Em ter=C3=A7a-feira, 4 de janeiro de 2022 =C3=A0s 10:52:42 UTC-3, Fabien Ch= outeau escreveu: > On Friday, December 31, 2021 at 5:13:33 PM UTC+1, daniel...@gmail.com wro= te:=20 > > For this reason, if really 'is' pure, not pure, preelaborate or what (?= ), pleeeeeeaaase, we ask the group's Ada Language Lawyers to help analyze a= nd suggest modifications if necessary. > I recommend reading this: https://stackoverflow.com/questions/19353228/wh= en-to-use-pragma-pure-preelaborate=20 >=20 > If your units are declared as Pure, the compiler considers that they have= no side effect and can decided to call the sub-programs only once and cach= e the result, or not even call the sub-program if the result is not used af= ter. Thanks! I read the post and believe that because most variables are either streamed= or aliased and imported, lib works as it should. However, there is still the possible problem of omitting the same subprogra= ms with the same parameters (by compiler), although in the tests this did n= ot happen, would replacing aspect 'pure' by 'preelaborate' solve this possi= ble problem? Thanks! Best Whishes, Dani.