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:a05:6214:518f:: with SMTP id kl15mr29520320qvb.4.1640899855338; Thu, 30 Dec 2021 13:30:55 -0800 (PST) X-Received: by 2002:a25:aa8c:: with SMTP id t12mr23439787ybi.615.1640899855164; Thu, 30 Dec 2021 13:30:55 -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: Thu, 30 Dec 2021 13:30:54 -0800 (PST) In-Reply-To: <8f565c79-f54c-4e60-a048-9bedde8757cfn@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: <3b6f0a2d-f3ba-45c8-9710-54d9edcf3fddn@googlegroups.com> <614502fd$0$1362$426a74cc@news.free.fr> <6155ac7f$0$6454$426a34cc@news.free.fr> <8f565c79-f54c-4e60-a048-9bedde8757cfn@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <5d9712bf-6ac7-4bba-b9f0-13be9d0a9ef4n@googlegroups.com> Subject: Re: ANN: Adare_net Ada network lib From: Daniel Norte Moraes Injection-Date: Thu, 30 Dec 2021 21:30:55 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:63314 List-Id: Em ter=C3=A7a-feira, 12 de outubro de 2021 =C3=A0s 16:44:33 UTC-3, ehh.p...= @gmail.com escreveu: > On Tuesday, October 12, 2021 at 5:49:58 PM UTC+2, Shark8 wrote:=20 > > On Thursday, September 30, 2021 at 6:24:34 AM UTC-6, DrPi wrote:=20 > > > Le 27/09/2021 =C3=A0 06:32, Daniel Norte Moraes a =C3=A9crit :=20 > > > > Em quarta-feira, 22 de setembro de 2021 =C3=A0s 08:07:06 UTC-3, joa= k...=20 > > > >> onsdag 22 september 2021 kl. 11:16:13 UTC+2 skrev AdaMagica:=20 > > > >>>> I agree with you Nicolas, they should not be declared Pure. It m= akes the GNAT compiler check for example that there are no global variables= used in the packages but other than that, they (I didn't check all the pac= kages) are not Pure. The pragma Pure worked as expected in Ada83 but the me= aning and utility of it disappeared with the Ada95 standard.=20 > > > >>> There is no pragma Pure in Ada 83.=20 > > > >> Thanks for clearing that up AdaMagica, I wasn't aware.=20 > > > >>=20 > > > >> Best regards,=20 > > > >> Joakim=20 > > > >=20 > > > > Really? They _are_ Pure.=20 > > > > I used linters extensively to result in this. one of these linters = made hard use o gnat and gprbuild as his backend.=20 > > > > Remember this is target Ada 2012 (update 2016) and beyond =3D> ther= e is=20 > > > > no guarantee of operation for Ada versions earlier than Ada2012.=20 > > > In a Pure package, shouldn't the subprograms also be Pure ?=20 > > Yes...ish.=20 > > As mentioned upthread, you can lie about there being no internal state.= .. and this can still be "interfacially" pure; consider a FIBONACCI functio= n which is memoized (Function F(N: Positive) return Positive) -- internally= it has the memo to look up F(N), which is obviously state, but externally = any F(X) will return the same value given the same inputs. / Perhaps we sho= uld allow aspect PURE on subprograms, as well as introduce an aspect STATIC= [having (user-defined) static-functions would, in particular, allow some n= ice "macro-lite" functionality]. > Well, aspect Static for expression functions is coming...=20 > http://www.ada-auth.org/cgi-bin/cvsweb.cgi/ai12s/ai12-0075-1.txt?rev=3D1.= 15=20 > http://ada-auth.org/standards/2xrm/html/RM-4-9.html=20 > http://ada-auth.org/standards/2xrm/html/RM-6-8.html=20 >=20 >=20 > --=20 > ~egilhh Thanks! I Followed Your Suggestion! Now that there is good support for ada202x in gcc-12, we have started solvi= ng the reported issues and adding everyone's suggestions. https://gitlab.com/daresoft/network/adare_net/-/tree/202x Beer with us! Best Wishes and Happy New Year(!), Dani.