CVS difference for ai12s/ai12-0124-1.txt
--- ai12s/ai12-0124-1.txt 2014/11/15 03:31:04 1.4
+++ ai12s/ai12-0124-1.txt 2014/11/18 06:52:29 1.5
@@ -25,8 +25,8 @@
!wording
-For a prefix X that denotes an object of a scalar type, the following
-attributes are defined:
+For a prefix X that denotes an object of a scalar type [(after any implicit
+dereference)], the following attributes are defined:
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
@@ -71,8 +71,8 @@
of a call on S'Value with @i<Arg> of type String is equivalent to a call on
S'Wide_Wide_Value for a corresponding @i<Arg> of type Wide_Wide_String.>
@dinss
-For a @fa<prefix> X that denotes an object of a scalar type, the following
-attributes are defined:
+For a @fa<prefix> X that denotes an object of a scalar type (after any
+implicit dereference), the following attributes are defined:
@xhang<@xterm<X'Wide_Wide_Image>
X'Wide_Wide_Image denotes the result of calling function
S'Wide_Wide_Image with @i<Arg> being X, where S is the nominal
@@ -103,12 +103,12 @@
At the meeting, we discussed where to put these new definitions in 3.5. The
minutes say we decided:
-Put each after the matching subtype version.
+Put each after the matching subtype version.
Unfortunately, this makes no sense. The subtype attributes are all under a
lead-in heading that says:
-For every scalar subtype S, the following attributes are defined:
+For every scalar subtype S, the following attributes are defined:
(It's way up at 3.5(11), it's easy to miss given that there are more than 60
paragraphs under that heading.)
@@ -116,7 +116,7 @@
The new attributes will have to be under a heading:
For a prefix X that denotes an object of a scalar type, the following
-attributes are defined:
+attributes are defined:
We could of course duplicate the headings all over the place, but that doesn't
make much sense. Thus, the only place to put these that makes sense is at the
@@ -126,4 +126,95 @@
group, I wanted to put on the record why I did that.
****************************************************************
+
+From: Jeffery Cousins
+Sent: Saturday, November 15, 2014 2:46 AM
+
+Thanks for spotting that that Randy. I'm surprised that we don't already have
+much on attributes of objects, 4.1.4 allows them. Where do we say that you can
+have `First and `Last on objects of an array type? 3.6.2 only has them for
+array types, not objects of an array type.
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Saturday, November 15, 2014 8:38 PM
+
+No, 3.6.2 says:
+
+The following attributes are defined for a prefix A that is of an array type
+[(after any implicit dereference)], or denotes a constrained array subtype:
+
+"OF an array type"; "object" is implicit here. Note that the subtype case is
+mentioned second. And there surely isn't any implicit dereference of a subtype.
+
+We can't share the attribute definitions here in 3.5 like is done in 3.6.2,
+because we need to talk about the argument in the X'Image case.
+
+I got the wording I used from X'Valid (and the letter of the prefix, too). I
+left out the part about "(after any implicit dereference)", because it seems to
+go without saying, but perhaps I should add it in to be consistent with other
+object attributes.
+
+****************************************************************
+
+From: Tucker Taft
+Sent: Saturday, November 15, 2014 12:43 PM
+
+> ... I'm just going to do that, but since I'm ignoring an explicit
+> decision of the group, I wanted to put on the record why I did that.
+
+Your approach makes sense to me. I would hope the semantics could be
+described by transformation, rather than by repeating them in all their
+gory details.
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Saturday, November 15, 2014 8:33 PM
+
+The wording we agreed on in Portland was:
+
+X'Image
+ X'Image denotes the result of calling function S'Image with Arg being X,
+ where S is the nominal subtype of X.
+
+And I didn't change that, just where it was located.
+
+****************************************************************
+
+From: Robert Dewar
+Sent: Sunday, November 16, 2014 5:38 AM
+
+> X'Image
+> X'Image denotes the result of calling function S'Image with Arg
+> being X, where S is the nominal subtype of X.
+
+That's nice, would have avoided introducing the annoying 'Img in GNAT. Is this a
+retroactive change?
+
+Sometimes I wonder whether it was a good idea to allow implementations freely to
+introduce new attributes (which in any case are non-portable) but not to extend
+existing attributes.
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Monday, November 17, 2014 11:34 PM
+
+> That's nice, would have avoided introducing the annoying 'Img in GNAT.
+> Is this a retroactive change?
+
+Of course, it's the annoying 'Img that gave us the idea for this change. Without
+the practice, we surely would never have approved it (some of the group found it
+ugly, but the fact that it has proven highly convenient in practice trumps such
+concerns).
+
+And, yes, it's a Binding Interpretation that will be in the upcoming
+Corrigendum, so it will be considered part of Ada 2012 (just like
+raise_expression and aspect Predicate_Failure). We're not really allowed to talk
+about previous versions of Ada, so we can't add it to Ada 95 or Ada 2005.
+
+****************************************************************
+
Questions? Ask the ACAA Technical Agent