CVS difference for ais/ai-00335.txt

Differences between 1.10 and version 1.11
Log of other versions for file ais/ai-00335.txt

--- ais/ai-00335.txt	2005/10/31 05:18:31	1.10
+++ ais/ai-00335.txt	2005/12/15 02:44:07	1.11
@@ -1,4 +1,4 @@
-!standard 03.02.03     (06)                            05-10-14  AI95-00335/04
+!standard 03.09.02     (01)                            05-11-23  AI95-00335/05
 !class binding interpretation 03-07-30
 !status Amendment 200Y 04-07-02
 !status WG9 approved 04-11-18
@@ -35,23 +35,18 @@
 !wording
 
 [Note: This wording assumes that the term "declaration list" is defined as
-in AI-420.]
+in AI-420, and the wording updates of AI-260-2.]
 
-Add after 3.2.3(6):
+Change the first sentence of 3.9.2(1) as follows:
 
-For a specific type, the stream-oriented attributes of the type that are
-available (see 13.13.2) at the end of the declaration list where the
-type is declared;
+The primitive subprograms of a tagged type{,}[ and] the subprograms declared by
+formal_abstract_subprogram_declarations{, and the stream attributes of a
+specific tagged type that are available (see 13.13.2) at the end of the
+declaration list where the type is declared} are called dispatching operations.
 
 AARM Note: For a type declared immediately within a package_specification which
 has a partial view, the declaration list to consider is the visible
 part of the package.
-
-Even if a stream-oriented attribute is specified by an
-attribute_definition_clause, it is not itself considered a user-defined
-subprogram, so it is not inherited. Rather, the rules explaining what happens
-to the stream-oriented attributes on type derivation are spelled out in chapter
-13.
 End AARM Note.
 
 !discussion
@@ -63,12 +58,11 @@
 on in these predefined attributes (we know that we cannot entirely eliminate
 that magic).
 
-The best solution seems to decide that stream-oriented attributes of specific
-types are primitive subprograms of the type. This makes them dispatching
-subprograms in the case of tagged types. Note however that they aren't
-inheritable in the sense of 3.4(17). They behave more like predefined
-operators, and are created anew for each type, based on the properties of the
-type.
+The best solution seems to be to explicitly declare that stream-oriented
+attributes of specific types are dispatching subprograms of the type.
+Note that we already have dispatching subprograms that are not primitive
+in the form of abstract formal subprograms (see AI-260-2), so it is fine to
+say this for these as well.
 
 We must be cautious, though, for two reasons:
 
@@ -95,23 +89,36 @@
 attributes of T'Class make a dispatching call to the corresponding attribute of
 T) but it is even falser now. It should read "(stream-oriented attributes are
 sometimes called in a non-dispatching manner)".
+
+!corrigendum 3.9.2(1)
 
-<<Integration Issue: If this AI is adopted, some of the replacement wording for
-13.13.2(36/1) in AI-195 should be changed to read "the corresponding attribute
-of T is a primitive subprogram of T". This would avoid a bit of wording
-replication.>>
-
-!corrigendum 3.2.3(6)
-
-@dinsa
-@xbullet<For a specific type declared immediately within a
-@fa<package_specification>, any subprograms (in addition to the enumeration
-literals) that are explicitly declared immediately within the same
-@fa<package_specification> and that operate on the type;>
-@dinst
-@xbullet<For a specific type, the stream-oriented attributes of the type that
-are available (see 13.13.2) at the end of the declaration list
-where the type is declared;>
+@drepl
+The primitive subprograms of a tagged type are called @i<dispatching
+operations>. A dispatching operation can be called using a statically
+determined @i<controlling> tag, in which case the body to be executed is
+determined at compile time. Alternatively, the controlling tag can be
+dynamically determined, in which case the call @i<dispatches> to a body that is
+determined at run time; such a call is termed a @i<dispatching call>. As
+explained below, the properties of the operands and the context of a particular
+call on a dispatching operation determine how the controlling tag is
+determined, and hence whether or not the call is a dispatching call. Run-time
+polymorphism is achieved when a dispatching operation is called by a
+dispatching call.
+@dby
+The primitive subprograms of a tagged type, the subprograms declared by
+@fa<formal_abstract_subprogram_declaration>s, and the stream attributes of a
+specific tagged type that are available (see 13.13.2) at the end of the
+declaration list where the type is declared are called @i<dispatching
+operations>. A dispatching operation can be called using a statically
+determined @i<controlling> tag, in which case the body to be executed is
+determined at compile time. Alternatively, the controlling tag can be
+dynamically determined, in which case the call @i<dispatches> to a body that is
+determined at run time; such a call is termed a @i<dispatching call>. As
+explained below, the properties of the operands and the context of a particular
+call on a dispatching operation determine how the controlling tag is
+determined, and hence whether or not the call is a dispatching call. Run-time
+polymorphism is achieved when a dispatching operation is called by a
+dispatching call.
 
 !ACATS test
 

Questions? Ask the ACAA Technical Agent