CVS difference for ai12s/ai12-0125-2.txt

Differences between 1.3 and version 1.4
Log of other versions for file ai12s/ai12-0125-2.txt

--- ai12s/ai12-0125-2.txt	2015/10/13 23:51:06	1.3
+++ ai12s/ai12-0125-2.txt	2015/12/18 02:06:58	1.4
@@ -357,7 +357,8 @@
 it more usable and as long as we do not enter the "redefine assignment
 operators" can of worm, the change looks pretty straightforward.
 
-I don't buy the argument "it just makes Ada bigger" since this argument would then apply to any new proposed feature.
+I don't buy the argument "it just makes Ada bigger" since this argument would
+then apply to any new proposed feature.
 
 ****************************************************************
 
@@ -422,6 +423,44 @@
 The set of subsets of a given set (its power set) ordered by inclusion (see the
 figure on top-right). Similarly, the set of sequences ordered by subsequence,
 and the set of strings ordered by substring. ...
+
+****************************************************************
+
+From: Jeff Cousins
+Sent: Wednesday, September 23, 2015  9:41 AM
+
+--  declare
+--     Temp : <type of A(I)> renames A(I);
+--  begin
+--     Temp := Temp * 2;
+--  end;
+
+Randy thinks we’re mad, but typically that is what we would code.  Occasionally
+it has revealed subtle problems, such as the programmer originally thought that
+<type of A(I)> was Altitude_Type whereas it turned out to be Height_Type, with
+different range constraints.
+
+Usually though we’d have several operations close together, such as
+
+declare
+     Temp : <type of A(I)> renames A(I);
+begin
+     Temp := Temp * 2;
+     …
+     Temp := Temp + 1;
+     …
+     Temp := Temp + B;
+end;
+
+which I would expect to be more efficient than
+
+A(I) *= 2;
+…
+A(I) += 1;
+…
+A(I) += B;
+
+unless a high-ish level of optimisation is used.
 
 ****************************************************************
 

Questions? Ask the ACAA Technical Agent