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=-0.5 required=3.0 tests=BAYES_05,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a05:620a:372a:: with SMTP id de42mr34613539qkb.14.1641258696445; Mon, 03 Jan 2022 17:11:36 -0800 (PST) X-Received: by 2002:a25:c401:: with SMTP id u1mr56084948ybf.498.1641258696283; Mon, 03 Jan 2022 17:11:36 -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: Mon, 3 Jan 2022 17:11:36 -0800 (PST) In-Reply-To: <3b7ba153-ebf1-4b85-a1b2-3ad5aaeca11en@googlegroups.com> Injection-Info: google-groups.googlegroups.com; posting-host=159.250.202.227; posting-account=ShYTIAoAAABytvcS76ZrG9GdaV-nXYKy NNTP-Posting-Host: 159.250.202.227 References: <3b7ba153-ebf1-4b85-a1b2-3ad5aaeca11en@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <15ffbb15-6f0b-4f61-8740-f100d9e384bbn@googlegroups.com> Subject: Re: Ada Pure or Preelaborate or ? in Adare_net From: Simon Belmont Injection-Date: Tue, 04 Jan 2022 01:11:36 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:63336 List-Id: On Friday, December 31, 2021 at 11:13:33 AM UTC-5, daniel...@gmail.com wrot= e: > Hi!=20 >=20 > I and a friend created an Ada network lib where,=20 > from the begining, we tried very hard to make It a Ada Pure.=20 >=20 > From the examples dir, the lib worked as expected (in gcc-10.2 gcc-11.2 a= nd gcc-12).=20 > To our surprise, what most caught the attention of the group's friends wa= s the fact that the lib was Ada Pure and if that was correct.=20 >=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 and= suggest modifications if necessary.=20 >=20 > link: https://gitlab.com/daresoft/network/adare_net/-/tree/202x=20 > for Ada version use 2012 and or 202x.=20 >=20 > Best Wishes and Happy New Year,=20 > Dani. It seems to be mostly just a thin binding to a bunch of C functions, so the= applicability of any Ada feature is mostly a moot point. The Ada compiler = has no control or visibility into the C domain, so while on the one hand yo= ur packages are technically Pure, on the other hand the C functions can vio= late those "purity rules" all they want, which might be misleading to users= expecting otherwise. You don't use 'Unchecked_Access either, but obviousl= y that doesn't mean the C functions are somehow prevented from creating dan= gling pointers. Personally, I would have the interfaces reflect the realit= y of the actual behavior (which in the case of C code you don't control, is= usually assume-the-worst). -sb