CVS difference for ai22s/ai22-0017-1.html

Differences between 1.2 and version 1.3
Log of other versions for file ai22s/ai22-0017-1.html

--- ai22s/ai22-0017-1.html	2023/04/07 06:37:00	1.2
+++ ai22s/ai22-0017-1.html	2023/04/28 02:30:03	1.3
@@ -1,4 +1,4 @@
-<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><title>AI22-0017-1/02</title>
+<html><head><meta content="text/html; charset=UTF-8" http-equiv="content-type"><title>AI22-0017-1/03</title>
 <style type="text/css">
 table td,table th{padding:0}
 BODY.body{background-color:#ffffff; max-width:468pt; padding:72pt 72pt 72pt 72pt}
@@ -16,8 +16,8 @@
 </style>
 </head><body class="body"><p class="l3h">AI22-0017-1</p>
 <p class="head">!standard 4.5.9(10/5) &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
-&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;23-04-03
-&nbsp;AI22-0017-1/02</p>
+&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;23-04-27
+&nbsp;AI22-0017-1/03</p>
 <p class="head">!class ramification 23-03-17</p>
 <p class="head">!status Corrigendum 1-2022 &nbsp;23-03-30</p>
 <p class="head">!status ARG Approved 12-0-0 &nbsp;23-03-30</p>
@@ -25,15 +25,15 @@
 <p class="head">!status received 21-04-08</p>
 <p class="head">!priority Low</p>
 <p class="head">!difficulty Easy</p>
-<p class="head">!subject Objects declared in declare expressions may be surprisingly long-lived</p>
+<p class="head">!subject Objects declared in declare expressions may be long-lived</p>
 <h2 class="head">!summary</h2>
 <p class="text">Clarify that an object declared within a declare_expression may outlive the
 evaluation of the expression. This may be surprising for folks who incorrectly think that a declare
 expression is equivalent to declaring a function and then calling it.</p>
 <h2 class="head">!issue</h2>
-<p class="text">In some (most?) cases, the evaluation of a declare expression is not a master. In
-such cases, the lifetimes of objects declared within the declare expression may extend well beyond
-the completion of the evaluation of the declare expression. This seems to be inconsistent with what
+<p class="text">In many cases, the evaluation of a declare expression is not a master. In such
+cases, the lifetimes of objects declared within the declare expression may extend well beyond the
+completion of the evaluation of the declare expression. This seems to be inconsistent with what
 many users expect, so an AARM note clarifying this point is added.</p>
 <h2 class="head">!recommendation</h2>
 <p class="text">This is just a clarification. No changes are being made.</p>
@@ -49,12 +49,12 @@
 <p class="txts">The original motivation for this AI was the requirement that objects created by
 repeated evaluations of a declare_expression as part of the evaluation of an enclosing expression
 persist until the entire expression is evaluated. For example, in an aggregate like
-<span class="yvf">(1..10 =&gt; (</span><span class="ujv">declare</span><span class="yvf">
-X:</span><span class="ujv">constant</span><span class="yvf"> Some_Controlled_Type := F
-</span><span class="ujv">begin</span><span class="yvf"> X.C)</span>, none of the 10 X objects could
-be finalized until all 10 had been evaluated. Eventually, it was recognized that lifetimes of
+<span class="yvf">(1..10 =&gt; (</span><span class="ujv">declare</span><span class="yvf"> X :
+</span><span class="ujv">constant</span><span class="yvf"> Some_Controlled_Type := F
+</span><span class="ujv">begin</span><span class="yvf"> X.C))</span>, none of the 10 X objects
+could be finalized until all 10 had been evaluated. Eventually, it was recognized that lifetimes of
 repeatedly evaluated subexpressions was a problem that existed in many existing cases (going back
-to Ada 95) and was not specific to declare_expressions. It was spun out into AI22-0040-1 and
+to Ada 95) and was not specific to declare_expressions. It was split out into AI22-0040-1 and
 addressed for all expressions.</p>
 
 <p class="txts">After some false starts, we realized that the model for Ada has always been that
@@ -64,11 +64,11 @@
 
 <p class="text">We note that AI22-0040-1 makes some exceptions to this general rule, but the
 general rule remains. This rule was adopted in part because creating/destroying a master probably
-has a runtime cost in any case where it is possible that finalization (or tasks waiting!) is
-needed. And there are many cases where it is not possible to determine that finalization is not
-needed. If every expression construct was a potential master, a lot of additional and unnecessary
-overhead could be created. Moreover, changing the general rule could have a significant effect on
-existing implementations (which do not have to create masters in the middle of expressions).</p>
+has a runtime cost in any case where it is possible that finalization (or task waiting!) is needed.
+And there are many cases where it is not possible to determine that finalization is not needed. If
+every expression construct was a potential master, a lot of additional and unnecessary overhead
+could be created. Moreover, changing the general rule could have a significant effect on existing
+implementations (which do not have to create masters in the middle of expressions).</p>
 <h2 class="head">!example</h2>
 <p class="txts">In the following example, the finalization of X takes place after, not before, the
 call to the procedure Proc:</p>

Questions? Ask the ACAA Technical Agent