CVS difference for ais/ai-00438.txt

Differences between 1.2 and version 1.3
Log of other versions for file ais/ai-00438.txt

--- ais/ai-00438.txt	2005/10/31 05:18:44	1.2
+++ ais/ai-00438.txt	2005/12/15 02:44:21	1.3
@@ -1,9 +1,9 @@
-!standard 11.4.1(02)                                   05-10-21  AI95-00438/01
+!standard 11.4.1(02)                                   05-11-22  AI95-00438/02
 !standard 11.4.1(06)
 !standard 11.4.1(16)
 !class binding interpretation 05-10-21
 !status Amendment 200Y 05-10-21
-!comment This AI is not yet approved, but is included in the Amendment.
+!status ARG Approved  8-0-3  05-11-19
 !status work item 05-10-21
 !status received 05-10-17
 !priority Medium
@@ -38,23 +38,23 @@
 
 Add the following to the end of the visible part Ada.Exceptions:
 
-    package Stream_Attributes is
-       procedure Read (Stream : not null access Ada.Streams.Root_Stream_Type'Class;
-                       Item : out Exception_Occurrence);
-       procedure Write (Stream : not null access Ada.Streams.Root_Stream_Type'Class;
-                       Item : in Exception_Occurrence);
-    end Stream_Attributes;
+    procedure Read_Exception_Occurrence
+       (Stream : not null access Ada.Streams.Root_Stream_Type'Class;
+        Item   : out Exception_Occurrence);
+    procedure Write_Exception_Occurrence
+       (Stream : not null access Ada.Streams.Root_Stream_Type'Class;
+        Item   : in Exception_Occurrence);
 
-    for Exception_Occurrence'Read use Stream_Attributes.Read;
-    for Exception_Occurrence'Write use Stream_Attributes.Write;
+    for Exception_Occurrence'Read use Read_Exception_Occurrence;
+    for Exception_Occurrence'Write use Write_Exception_Occurrence;
 
 Add "with Ada.Streams;" to the start of this package.
 
 Replace 11.4.1(16) by (moving this to Static Semantics):
 
-Stream_Attributes.Write writes a representation of an exception occurrence to a
-stream; Stream_Attributes.Read reconstructs an exception occurrence from a
-stream (including one written in a different partition).
+Write_Exception_Occurrence writes a representation of an exception occurrence
+to a stream; Read_Exception_Occurrence reconstructs an exception occurrence
+from a stream (including one written in a different partition).
 
 !discussion
 
@@ -68,7 +68,7 @@
  Exception_Occurrence (11.4.1): yes, should stream.
  File_Type (A.8, others): no, surely you don't want to stream the contents.
  Generator (A.5.2): this could be streamed, but the package provides type
-   State as a nonlimited version of a Geneator, so there isn't much need.
+   State as a nonlimited version of a Generator, so there isn't much need.
  Group_Budget (D.14.2): no, probably a runtime object anyway.
  Limited_Controlled (7.6): no, does not need to stream.
  Root_Stream_Type (13.13.1): no. streaming a stream?  Hopefully not.
@@ -86,7 +86,7 @@
 that has "really limited" components (such as a task or protected component)
 would need to have stream attributes defined.
 
-For Exception_Occurrence, we've declared a nested package and the
+For Exception_Occurrence, we've declared procedures and the
 stream attributes explicitly in the visible part. We considered three options
 for handling this:
  (1) A textual rule saying that the attributes are available. That would
@@ -102,12 +102,18 @@
      incompatibility, but it is less likely because there is only one name
      made visible.
 
-We chose the third option, as it has the less compatibility impact than (2),
+We chose the second option, as it isn't as gimmicky as (3),
 and doesn't require compiler magic like (1). We prefer to avoid magic as
 Ada users often use these package specifications as examples of how to write
 Ada packages, and it is preferable that they can actually write similar
 packages themselves.
 
+The incompatibilities of (2) are not considered to be a major issue. The
+names of the procedures are specific enough that they're unlikely to occur
+in user code. We could have eliminated the incompatibility completely by
+giving the routines names that included some non-Latin-1 characters, but that
+is even more gimmicky that (3), so it was also rejected.
+
 !corrigendum 11.4.1(02)
 
 @drepl
@@ -138,15 +144,15 @@
     @b<function> Save_Occurrence(Source : Exception_Occurrence)
                              @b<return> Exception_Occurrence_Access;>
 
-@xcode<    @b<package> Stream_Attributes @b<is>
-       @b<procedure> Read (Stream : @b<not null access> Ada.Streams.Root_Stream_Type'Class;
-                       Item : @b<out> Exception_Occurrence);
-       @b<procedure> Write (Stream : @b<not null access> Ada.Streams.Root_Stream_Type'Class;
-                       Item : @b<in> Exception_Occurrence);
-    @b<end> Stream_Attributes;>
+@xcode<    @b<procedure> Read_Exception_Occurrence
+       (Stream : @b<not null access> Ada.Streams.Root_Stream_Type'Class;
+        Item   : @b<out> Exception_Occurrence);
+    @b<procedure> Write_Exception_Occurrence
+       (Stream : @b<not null access> Ada.Streams.Root_Stream_Type'Class;
+        Item   : @b<in> Exception_Occurrence);>
 
-@xcode<    @b<for> Exception_Occurrence'Read @b<use> Stream_Attributes.Read;
-    @b<for> Exception_Occurrence'Write @b<use> Stream_Attributes.Write;>
+@xcode<    @b<for> Exception_Occurrence'Read @b<use> Read_Exception_Occurrence;
+    @b<for> Exception_Occurrence'Write @b<use> Write_Exception_Occurrence;>
 
 @xcode<@b<private>
    ... -- @i<@ft<not specified by the language>>
@@ -163,9 +169,9 @@
 reconstructing an exception occurrence from a stream (including one written in
 a different partition).
 @dby
-Stream_Attributes.Write writes a representation of an exception occurrence to a
-stream; Stream_Attributes.Read reconstructs an exception occurrence from a
-stream (including one written in a different partition).
+Write_Exception_Occurrence writes a representation of an exception occurrence
+to a stream; Read_Exception_Occurrence reconstructs an exception occurrence
+from a stream (including one written in a different partition).
 
 !ACATS test
 

Questions? Ask the ACAA Technical Agent