CVS difference for ais/ai-00348.txt

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

--- ais/ai-00348.txt	2003/09/11 21:47:05	1.1
+++ ais/ai-00348.txt	2003/09/11 21:53:06	1.2
@@ -3,6 +3,9 @@
 !standard  7.06(06)
 !standard  7.06(08)
 !standard  7.06(09)
+!standard 12.06(03)
+!standard 12.06(08)
+!standard 12.06(10)
 !class amendment 03-09-02
 !status work item 03-09-02
 !status received 03-09-02
@@ -26,6 +29,8 @@
          null;
      end;
 
+The use of "null" as a default for generic formal procedures is also supported.
+
 !problem
 
 Null procedures are a prerequisite for AI-251 (abstract interfaces); see
@@ -76,6 +81,21 @@
     The (default) implementations of Initialize, Adjust, and Finalize
     have no effect.
 
+Add to 12.6(3)
+    subprogram_default ::= ... | null
+
+Add after 12.6(8)
+
+    A subprogram_default of null shall not be specified for a formal function.
+
+Add after 12.6(10)
+
+    If a generic unit has a subprogram_default specified by a null, and the
+    corresponding actual parameter is omitted, then it is equivalent to
+    an explicit actual parameter that is an anonymous null procedure having
+    the profile given in the formal_subprogram_declaration. The anonymous null
+    procedure is implicitly declared immediately before the instantiation.
+    The anonymous null procedure is not a primitive subprogram of any type.
 
 !discussion
 
@@ -185,7 +205,7 @@
 defined in a separate AI, rather than as a part of AI-251 (interface
 types). This is an initial version of that AI.
 
-[This is version /01 of the AI.]
+[This is version /01 of the AI. - ED]
 
 ****************************************************************
 
@@ -252,6 +272,56 @@
 And we agreed to include it at the last meeting. So, I think it should be
 included in the AI unless there is a pretty significant problem with it (in
 which case, the problem ought to be discussed in the Discussion section).
+
+****************************************************************
+
+From: Stephen W Baird
+Sent: Thursday, September 4, 2003  7:49 PM
+
+Oops - I forgot that we had approved it. Thanks for keeping me honest.
+
+Here's an attempt at wording for "with procedure P (...) is null;".
+
+[This is version /02 of the AI. - ED]
+
+****************************************************************
+
+From: Tucker Taft
+Sent: Thursday, September 4, 2003  9:18 PM
+
+> Legality Rules
+>
+>   Add after 12.6(8)
+>
+>     A subprogram_default of null shall not be specified for a formal
+> function.
+
+This probably belongs in the Syntactic rules rather than
+in the Legality rules, since it requires no semantic
+information.
+
+>
+> Static Semantics
+>
+>   Add after 12.6(10)
+>
+>     If a generic unit has a subprogram_default specified by a null, and the
+
+    "... specified by the reserved word null, ..."
+
+>     corresponding actual parameter is omitted, then it is equivalent to
+>     an explicit actual parameter that is an anonymous null procedure having
+>     the profile given in the formal_subprogram_declaration. The anonymous null
+
+Why do you bother calling it "anonymous"?  Is there something
+significant about that?
+
+>     procedure is implicitly declared immediately before the instantiation.
+>     The anonymous null procedure is not a primitive subprogram of any type.
+
+This seems overly complicated.  Why do we care where the actual
+is declared, or what is its name?  All we need to say is that
+it is a procedure whose body has no effect when invoked.
 
 ****************************************************************
 

Questions? Ask the ACAA Technical Agent