comp.lang.ada
 help / color / mirror / Atom feed
From: Joakim Strandberg <joakimds@kth.se>
Subject: Re: ANN: Adare_net Ada network lib
Date: Wed, 22 Sep 2021 01:47:13 -0700 (PDT)	[thread overview]
Message-ID: <f4c9bac9-e745-410e-b98b-39785f7e46ecn@googlegroups.com> (raw)
In-Reply-To: <614502fd$0$1362$426a74cc@news.free.fr>

> I had a quick look at the top level source code. I'm surprised all 
> packages are declared with "pure" aspect. 
> From what I understand of the "pure" aspect, these packages are not pure. 
> Am I wrong ? 
> 
> Regards, 
> Nicolas

I agree with you Nicolas, they should not be declared Pure. It makes 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 packages) are not Pure. The pragma Pure worked as expected in Ada83 but the meaning and utility of it disappeared with the Ada95 standard. It is possible in Ada95 to declare a package as Pure and then import C-functions that can do anything. 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 use of a tagged type inside a package or there is some C-function that is imported, 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, this is a small issue since it is easy to remove the Pure aspects. In any case, thanks to the author for writing adare_net and sharing it with the World!

Best regards,
Joakim

  reply	other threads:[~2021-09-22  8:47 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-05  3:54 ANN: Adare_net Ada network lib Daniel Norte Moraes
2021-09-17 21:04 ` DrPi
2021-09-22  8:47   ` Joakim Strandberg [this message]
2021-09-22  9:16     ` AdaMagica
2021-09-22 11:07       ` Joakim Strandberg
2021-09-27  4:32         ` Daniel Norte Moraes
2021-09-30 12:24           ` DrPi
2021-09-30 20:10             ` Daniel Norte Moraes
2021-10-01 17:33               ` DrPi
2021-10-01 19:11                 ` Simon Wright
2021-10-12 16:00                 ` Shark8
2021-12-30 21:15                 ` Daniel Norte Moraes
2021-10-12 15:49             ` Shark8
2021-10-12 19:44               ` Egil H H
2021-12-30 21:30                 ` Daniel Norte Moraes
2021-09-28  4:52       ` Randy Brukardt
2021-12-30 20:56         ` Daniel Norte Moraes
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox