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.0 required=3.0 tests=BAYES_20,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a05:622a:208:: with SMTP id b8mr44579248qtx.326.1641304361932; Tue, 04 Jan 2022 05:52:41 -0800 (PST) X-Received: by 2002:a05:6902:102a:: with SMTP id x10mr32484793ybt.305.1641304361642; Tue, 04 Jan 2022 05:52:41 -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: Tue, 4 Jan 2022 05:52:41 -0800 (PST) In-Reply-To: <3b7ba153-ebf1-4b85-a1b2-3ad5aaeca11en@googlegroups.com> Injection-Info: google-groups.googlegroups.com; posting-host=89.157.139.225; posting-account=L3mulQoAAADsXVjCD5rM6Ap3Xy0U3ckB NNTP-Posting-Host: 89.157.139.225 References: <3b7ba153-ebf1-4b85-a1b2-3ad5aaeca11en@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <546e54e7-64ba-48a5-a990-d644947992ccn@googlegroups.com> Subject: Re: Ada Pure or Preelaborate or ? in Adare_net From: Fabien Chouteau Injection-Date: Tue, 04 Jan 2022 13:52:41 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader02.eternal-september.org comp.lang.ada:63338 List-Id: On Friday, December 31, 2021 at 5:13:33 PM UTC+1, daniel...@gmail.com wrote: > 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. I recommend reading this: https://stackoverflow.com/questions/19353228/when-to-use-pragma-pure-preelaborate 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 cache the result, or not even call the sub-program if the result is not used after.