CVS difference for ai12s/ai12-0020-1.txt

Differences between 1.13 and version 1.14
Log of other versions for file ai12s/ai12-0020-1.txt

--- ai12s/ai12-0020-1.txt	2018/10/15 23:57:45	1.13
+++ ai12s/ai12-0020-1.txt	2018/10/17 01:03:26	1.14
@@ -1,4 +1,4 @@
-!standard 4.10(0)                                     18-10-14   AI12-0020-1/05
+!standard 4.10(0)                                     18-10-16   AI12-0020-1/06
 !standard 3.5(27.1/2)
 !standard 3.5(55.1/5)
 !standard 3.5(55.2/5)
@@ -46,8 +46,8 @@
 a Wide_Wide_String representing the value in display form.
 
 That Wide_Wide_String value is determined (approximately) as follows:
-   For scalars - same image that Wide_Wide_Image has always generated
-     since it was introduced in Ada95.
+   For scalars - the same image that Wide_Wide_Image already generated before 
+     this AI.
    For access types -
      Integer value displayed as a hex digits preceded by an '@',
      except null displayed as "NULL". Number of hex digits determined
@@ -113,7 +113,7 @@
 
       S'Put_Image
         S'Put_Image denotes a procedure with the following specification:
-           S'Put_Image
+           procedure S'Put_Image
              (Arg    : T;
               Stream : not null access Ada.Streams.Root_Stream_Type'Class);
 
@@ -306,15 +306,16 @@
    The order in which components are written for
    a composite type is the same canonical order in
    which components of a composite type T are written out
-   by the default implementation of T'Write. [This is also the
+   by the default implementation of T'Write. Redundant[This is also the
    order that is used in determining the meaning of a positional aggregate
    of type T.]
 
    For a class-wide type, the default implementation of T'Put_Image
    generates an image based on qualified expression syntax.
    Wide_Wide_String'Write is called with Wide_Wide_Expanded_Name of Arg'Tag.
-   Then Corresponding_Specific_Type'Put_Image is called. [At the
-   implementation level this will typically require a dispatching call.]
+   Then Corresponding_Specific_Type'Put_Image is called.
+  
+   [AARM Implementation Note: This will typically require a dispatching call.]
 
    [AARM Note: This might generate an image such as
       "SOME_PACKAGE.SOME_TAGGED_TYPE'(COMPONENT_1 =>  123, COMPONENT_2 =>  456)"
@@ -323,7 +324,7 @@
 
    For a (specific) type extension, the default implementation of T'Put_Image
    depends on whether there exists a noninterface ancestor of T (other than
-   T itself) for which the Put_Image aspect has been [explicitly] specified.
+   T itself) for which the Put_Image aspect has been Redunant[explicitly] specified.
    If so, then T'Put image will generate an image based on extension aggregate
    syntax where the ancestor type of the extension aggregate is the
    nearest ancestor type whose Put_Aspect has been specified.
@@ -451,27 +452,14 @@
 non-scalar type T without having to override the default implementation of
 T'Put_Image.
 
-That is the motivation for introducing
-    a) The package Ada.Streams.Counted_Streams.Bounded and its
-       associated implementation advice.
-    b) The aspect (and attribute) Max_Image_Elements
-    c) The pragma Default_Max_Image_Elements.
-    d) The interaction (for a given type T) between
-       T'Max_Image_Elements and the default implementation
-       of T'Put_Image .
+That is the motivation for introducing the Max_Image_Length restriction. The
+desired goal can be achieved by specifying a Max_Image_Length restriction.
 
-An application can specify T'Max_Image_Elements either explicitly or via a
-Default_Max_Image_Elements configuration pragma. Having done that, the default
-implementation of T'Put_Image will reference Counted_Streams.Bounded instead
-of Counted_Streams.Unbounded.
+The cost is that the burden is on the user to choose a "good" value for the 
+restriction. If the value is too small, then a call to T'Put_Image may violate
+the restriction (at runtime); if the value is too big, then the storage 
+requirements of a call to T'Put_Image may be unnecessarily large.
 
-This will achieve the desired goal.
-
-The cost is that the burden is on the user to choose a "good" value for
-T'Max_Image_Elements. If the value is too small, then a call to T'Put_Image
-may fail; if the value is too big, then the storage requirements of a call
-to T'Put_Image may be unnecessarily large.
-
 ----
 
 Put_Image is user-specifiable; Wide_Wide_Image is not.
@@ -3266,7 +3254,7 @@
 **************************************************************
 
 From: Randy Brukardt
-Sent: Monday, October 14, 2018  6:56 PM
+Sent: Monday, October 15, 2018  6:56 PM
 
 > The attached is a new version of this AI, incorporating the
 > feedback from the Lisbon meeting.
@@ -3338,6 +3326,141 @@
 I did remove a double space before "of", and add a missing closing bracket ].
 And used the number 293 rather ??? in a couple of places. Otherwise, I left the
 original AI unchanged.
+
+**************************************************************
+
+From: Steve Baird
+Sent: Tuesday, October 16, 2018  6:28 PM
+
+> Some nitpicks:
+> 
+>>     For scalars - same image that Wide_Wide_Image has always generated
+>>      since it was introduced in Ada95.
+> 
+> Wide_Wide_Image was introduced in Ada 2005. Ada 95 had Wide_Image 
+> (only). > Some of the details of Image have been changed in recent Ada 
+> versions as well (especially for Character et. al.). So I'm not sure 
+> of the best possible replacement here (just saying "Ada 2005" doesn't seem 
+> to have the intended impact).
+
+I suggest "the same image that Wide_Wide_Image already generated before 
+this AI".
+
+>>    For class-wide types, the image obtained from the specific
+>>       type is prefixed with the name of the tag
+>>       and a "'", yielding qualified expression syntax, as in
+>>       "My_Pkg.My_Tagged_Type'(ABC => True, DEF => 123.45)".
+> 
+> Is this the name of the type of the tag, or the external name of the tag?
+> (The previous version was clear that it was the external name.) I'd 
+> add "external" in this text if that's the intent. But I'm not certain 
+> it ought to be: the external name might not have anything to do with a 
+> type name and it might not work well as an expanded name.
+
+I think this lack of precision is fine in the !proposal section, particularly 
+since this question is answered in the !wording section, where is says that 
+Wide_Wide_Expanded_Name is called. I suggest that no action is needed for 
+this one.
+
+>>    S'Put_Image denotes a procedure with the following specification:
+>>        S'Put_Image
+>>            (Arg    : T;
+>>             Stream : not null access 
+>> Ada.Streams.Root_Stream_Type'Class);
+> 
+> This is got to be the first Ada procedure I've seen without the 
+> keyword "procedure"! Compare to the declarations in 13.13.2. 
+> ("procedure" should go before the last S'Put_Image here).
+
+I agree. The word "procedure" is missing and should be added.
+
+>>    X'Wide_Wide_Image
+>>       X'Wide_Wide_Image denotes the result of calling function
+>>       S'Wide_Wide_Image with Arg being X, where S is the nominal 
+>> subtype of
+> X.
+> 
+> The lead-in text has disappeared here; we have no idea what X is here. 
+> I left the text from the previous version in the posted AI.
+
+Good catch! I don't know what happened to
+   For a prefix X that denotes an object of a non-universal type T, the
+   following attributes are defined:
+but I agree that it ought to be there.
+
+>> That is the motivation for introducing
+>>     a) The package Ada.Streams.Counted_Streams.Bounded and its
+>>        associated implementation advice.
+>>     b) The aspect (and attribute) Max_Image_Elements
+>>     c) The pragma Default_Max_Image_Elements.
+>>     d) The interaction (for a given type T) between
+>>        T'Max_Image_Elements and the default implementation
+>>        of T'Put_Image .
+> 
+> (a) is now in AI12-0293-1, and I believe that (b), (c), and (d) have 
+> been replaced by a restriction. There is a bunch of other discussion 
+> text that tries to explain (b), (c), and (d). That all needs to be 
+> replaced by text explaining how to use the restriction. I could have 
+> fixed (a), but the rest is too much.
+ 
+
+Good point. This stuff was updated in the !wording but not in the !discussion.
+
+Here is a possible replacement:
+====
+That is the motivation for introducing the Max_Image_Length restriction. The 
+desired goal can be achieved by specifying a Max_Image_Length restriction.
+
+The cost is that the burden is on the user to choose a "good" value for the 
+restriction. If the value is too small, then a call to T'Put_Image may violate
+the restriction (at runtime); if the value is too big, then the storage 
+requirements of a call to T'Put_Image may be unnecessarily large.
+====
+
+> I did remove a double space before "of", and add a missing closing 
+> bracket ]. And used the number 293 rather ??? in a couple of places. 
+> Otherwise, I left the original AI unchanged.
+
+Thanks.
+
+**************************************************************
+
+From: Randy Brukardt
+Sent: Tuesday, October 16, 2018  7:50 PM
+
+OK, made these updates to the AI (version /06).
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Tuesday, October 16, 2018  7:50 PM
+
+Just happened to notice one more nitpick:
+
+> For a class-wide type, the default implementation of T'Put_Image
+> generates an image based on qualified expression syntax.
+> Wide_Wide_String'Write is called with Wide_Wide_Expanded_Name of Arg'Tag.
+> Then Corresponding_Specific_Type'Put_Image is called. [At the
+> implementation level this will typically require a dispatching call.]
+
+I don't think that the typical reader cares what the implementation might or 
+might not do to implement the default version of this. So this "Redundant" 
+statement (which is missing the "Redundant" lead-in) makes more sense as an
+AARM implementation note.
+
+So I've changed this to:
+
+  For a class-wide type, the default implementation of T'Put_Image
+  generates an image based on qualified expression syntax.
+  Wide_Wide_String'Write is called with Wide_Wide_Expanded_Name of Arg'Tag.
+  Then Corresponding_Specific_Type'Put_Image is called.
+
+  AARM Implementation Note: This will typically require a dispatching call.
+
+---
+
+I also added "Redundant" in front of square brackets in the actual wording 
+(not AARM notes). Else someone could easily confuse that with a deletion.
 
 ****************************************************************
 

Questions? Ask the ACAA Technical Agent