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 autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:ad4:4671:: with SMTP id z17mr35241302qvv.62.1632300434214; Wed, 22 Sep 2021 01:47:14 -0700 (PDT) X-Received: by 2002:a25:7e46:: with SMTP id z67mr41868385ybc.166.1632300434035; Wed, 22 Sep 2021 01:47:14 -0700 (PDT) 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, 22 Sep 2021 01:47:13 -0700 (PDT) In-Reply-To: <614502fd$0$1362$426a74cc@news.free.fr> Injection-Info: google-groups.googlegroups.com; posting-host=136.163.208.2; posting-account=HFCrOQoAAABZD_f-UUbYHm3lJDIrh-UX NNTP-Posting-Host: 136.163.208.2 References: <3b6f0a2d-f3ba-45c8-9710-54d9edcf3fddn@googlegroups.com> <614502fd$0$1362$426a74cc@news.free.fr> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: ANN: Adare_net Ada network lib From: Joakim Strandberg Injection-Date: Wed, 22 Sep 2021 08:47:14 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:62813 List-Id: > I had a quick look at the top level source code. I'm surprised all=20 > packages are declared with "pure" aspect.=20 > From what I understand of the "pure" aspect, these packages are not pure.= =20 > Am I wrong ?=20 >=20 > Regards,=20 > Nicolas I agree with you Nicolas, they should not be declared Pure. It makes the GN= AT compiler check for example that there are no global variables used in th= e packages but other than that, they (I didn't check all the packages) are = not Pure. The pragma Pure worked as expected in Ada83 but the meaning and u= tility of it disappeared with the Ada95 standard. It is possible in Ada95 t= o declare a package as Pure and then import C-functions that can do anythin= g. It is also possible in Ada95 to circumvent the meaning of pragma Pure or= the Pure aspect by taking advantage of dynamic dispatch. If there is any u= se of a tagged type inside a package or there is some C-function that is im= ported, the package should not be labeled as Pure. It should be possible to= develop a libadalang- or ASIS based application to check for this. Well, t= his is a small issue since it is easy to remove the Pure aspects. In any ca= se, thanks to the author for writing adare_net and sharing it with the Worl= d! Best regards, Joakim