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

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

--- ai12s/ai12-0020-1.txt	2018/03/02 06:46:44	1.6
+++ ai12s/ai12-0020-1.txt	2018/03/30 07:55:07	1.7
@@ -1321,3 +1321,80 @@
 objects ought to be special in this way.
+From: Tucker Taft
+Sent: Friday, March  2, 2018  2:55 AM
+I agree this is true of all "immutably limited" types.  But the large majority
+of immutably limited types are that because they contain a task or a protected
+object, so adding such an identifier to a protected object seemed to solve
+most of the problem.  I wouldn't be averse to a more general solution, but I
+don't have a proposal for that.
+From: Steve Baird
+Sent: Wednesday, March 28, 2018  6:57 PM
+Still no wording.
+Here are the results of some discussions I've had with Randy and Tuck
+since the summary I sent out a month ago. This includes both
+decisions (tentatively) made and questions raised.
+1)  For a task type T, T'Image yields
+    "(task <task_id_image>)"
+or, if discriminants are involved,
+    "(task <task_id_image> with D1 => 123, D2 => 456)"
+2) For a protected type, there is nothing analogous to
+the task stuff (because there is nothing analogous to
+a task_id for protected types). Protected types just get displayed
+like any other record.
+3) The default implementation of Put for a protected type would
+be implemented as something like
+    procedure Put (X : T; S : access Counted_Stream'Class) is
+       Ignored : constant Dummy_Type := X.<Put_Helper> (S);
+    begin
+       null;
+    end;
+where <Put_Helper> is an anonymous compiler-generated protected
+function. The idea here is to write out to the stream a consistent
+snapshot of the state of the protected record, using only one
+protected action to access all components. The definition given
+in the RM only needs to say that the default implementation of
+T'Image where T is a protected type involves calling a
+protected function.
+One could imagine making this protected function visible (perhaps
+via some new attribute), but let's wait until there is some
+demand for this.
+4) Recall that in this new scheme [Wide_[Wide_]]Image is not a
+user-specifiable attribute. Instead, a new attribute (tentatively
+named Put) can be specified and Image and friends are defined
+in terms of Put.
+Do we want to name this new attribute "Put" or "Put_Image" ?
+5) In the absence of a user-specified Put operation, should
+new discriminants for a derived untagged type have an effect
+on the image? Presumably yes (at least that's how the
+streaming attributes work).
+So the assertion in this example should succeed:
+    type T1 (D1, D2 : Positive) is record ... end record; -- untagged
+    type T2 (D : Positive) is new T1 (D1 => D, D2 => D);
+    X : T2 (D => 123) := ... ;
+    pragma Assert (X'Image /= T1(X)'Image);

Questions? Ask the ACAA Technical Agent