CVS difference for ai05s/ai05-0139-2.txt

Differences between 1.14 and version 1.15
Log of other versions for file ai05s/ai05-0139-2.txt

--- ai05s/ai05-0139-2.txt	2011/04/07 06:30:23	1.14
+++ ai05s/ai05-0139-2.txt	2011/04/19 06:04:29	1.15
@@ -1,4 +1,4 @@
-!standard 4.1(2/2)                                    11-04-06  AI05-0139-2/10
+!standard 4.1(2/2)                                    11-04-19  AI05-0139-2/11
 !standard 4.1.5(0)
 !standard 4.1.6(0)
 !standard 5.5(3)
@@ -649,16 +649,16 @@
 
    These aspects are inherited by descendants of type T (including T'Class).
 
-   An /iteratable type/ is an indexable type with specified Default_iterator and
-   Iterator_Element aspects. A /reverse iteratable type/ is an
-   iteratable type with the default iterator type being a reversible
-   iterator type. An /iteratable object/ is an object of an
-   iteratable type. A /reverse iteratable object/ is an object of a
-   reverse iteratable type.
+   An /iterable type/ is an indexable type with specified Default_iterator and
+   Iterator_Element aspects. A /reverse iterable type/ is an
+   iterable type with the default iterator type being a reversible
+   iterator type. An /iterable object/ is an object of an
+   iterable type. A /reverse iterable object/ is an object of a
+   reverse iterable type.
 
              Legality Rules
 
-   The Constant_Indexing aspect (if any) of an iteratable type T
+   The Constant_Indexing aspect (if any) of an iterable type T
    shall denote exactly one function with the following properties:
 
       * the result type of the function is covered by
@@ -673,7 +673,7 @@
    This function (if any) is the /default constant indexing function/
    for T.
 
-   The Variable_Indexing aspect (if any) of an iteratable type T
+   The Variable_Indexing aspect (if any) of an iterable type T
    shall denote exactly one function with the following properties:
 
       * the result type of the function is a reference type
@@ -696,7 +696,7 @@
    iterator_specification ::=
       defining_identifier IN [REVERSE] /iterator_/name
     | defining_identifier [: subtype_indication] OF [REVERSE] /array_/name
-    | defining_identifier [: subtype_indication] OF [REVERSE] /iteratable_/name
+    | defining_identifier [: subtype_indication] OF [REVERSE] /iterable_/name
 
                Name Resolution
 
@@ -706,7 +706,7 @@
    component iterator/; the expected type for the /array_/name is any
    array type. The third form of iterator_specification is called a
    /container element iterator/; the expected type for the
-   /iteratable_/name is any iteratable type.
+   /iterable_/name is any iterable type.
 
                Legality Rules
 
@@ -714,18 +714,18 @@
    /reverse iterator/; otherwise it is a /forward iterator/. In a
    reverse generalized iterator, the /iterator_/name shall be of a
    reversible iterator type. In a reverse container element iterator,
-   the default iterator type for the type of the /iteratable_/name shall
+   the default iterator type for the type of the /iterable_/name shall
    be a reversible iterator type.
 
    The type of the subtype_indication, if any, of an array component
    iterator shall cover the component type of the type of the
    /array_/name. The type of the subtype_indication, if any, of a
    container element iterator shall cover the default element type for
-   the type of the /iteratable_/name.
+   the type of the /iterable_/name.
 
-   In a container element iterator, if the /iteratable_/name denotes a
+   In a container element iterator, if the /iterable_/name denotes a
    constant, then the Constant_Indexing aspect shall be specified for
-   the type of the /iteratable_/name.
+   the type of the /iterable_/name.
 
             Static Semantics
 
@@ -739,14 +739,14 @@
    type of the /array_/name. In a container element iterator if a
    subtype_indication is not present, the nominal subtype of the loop
    parameter is the default element subtype for the type of the
-   /iteratable_/name.
+   /iterable_/name.
 
    In an array component iterator, the loop parameter denotes a constant
    if the /array_/name denotes a constant; otherwise it denotes a
    variable. In a container element iterator, the loop parameter denotes
-   a constant if the /iteratable_/name denotes a constant, or if the
+   a constant if the /iterable_/name denotes a constant, or if the
    Variable_Indexing aspect is not specified for the type of the
-   /iteratable_/name; otherwise it denotes a variable.
+   /iterable_/name; otherwise it denotes a variable.
 
             Dynamic Semantics
 
@@ -788,10 +788,10 @@
    array for the loop, or until the loop is left as a consequence of a
    transfer of control.
 
-   For a container element iterator, the /iteratable_/name is evaluated
-   and the iteratable object denoted by the name becomes the /iteratable
+   For a container element iterator, the /iterable_/name is evaluated
+   and the iterable object denoted by the name becomes the /iterable
    object for the loop/. The default iterator function for the type of
-   the iteratable object for the loop is called on the iteratable object
+   the iterable object for the loop is called on the iterable object
    and the result is the /loop iterator/. An object of the default
    cursor subtype is created (the /loop cursor/).
 
@@ -800,7 +800,7 @@
    value for the loop cursor. If the initial value is equal to
    No_Element, then the execution of the loop_statement is complete.
    Otherwise, the sequence_of_statements is executed with the loop
-   parameter denoting an indexing (see 4.1.6) into the iteratable object
+   parameter denoting an indexing (see 4.1.6) into the iterable object
    for the loop, with the only parameter to the indexing being the
    current value of the loop cursor; then the Next operation of the
    iterator type is called with the loop iterator and the loop cursor to
@@ -810,7 +810,7 @@
    reverse container element iterator, the operations Last and Previous
    are called rather than First and Next. If the loop parameter is a
    constant (see above), then the indexing uses the default constant
-   indexing function for the type of the iteratable object for the loop;
+   indexing function for the type of the iterable object for the loop;
    otherwise it uses the default variable indexing function.
 
 Modify second sentence of 13.13.2(9/2):
@@ -3647,7 +3647,7 @@
 
 ---
 
-The legality rules for an iterable type seem to make the intended definition for
+The legality rules for an iteratable type seem to make the intended definition for
 Maps conflict with the rules for a default iterator. Specifically, I was
 expecting that we would define two pairs of indexing functions: one for cursors
 and the other for the key type, so that AI_Author_Map ("Taft") := 139; would be
@@ -3742,7 +3742,7 @@
 >
 > ---
 >
-> The legality rules for an iterable type seem to make the intended
+> The legality rules for an iteratable type seem to make the intended
 > definition for Maps conflict with the rules for a default iterator.
 > Specifically, I was expecting that we would define two pairs of
 > indexing functions: one for cursors and the other for the key type, so
@@ -3859,3 +3859,166 @@
 i guess that part does not get edited further.
 
 ****************************************************************
+
+From: Edmond Schonberg
+Sent: Thursday, April 14, 2011  2:13 AM
+
+****************************************************************
+
+From: Christoph Grein
+Sent: Thursday, April 14, 2011  2:13 AM
+
+The new chapter 5.5.1 uses the new term iteratable_name.
+
+I checked Webster's online to no avail, also my printed (heavy) version at home,
+also iterable isn't there. So it's a weak statement that I'm making - but:
+
+I think from the Latin origin, iterare, to walk, the correct derivation would be
+iterable (from iterabilis (don't know if it exists, but conforms to word
+construction in Latin); like curare, curabilis - curable).
+
+This term is also used in Java; and there is a reference to Webster's Revised
+Unabridged Dictionary in http://www.thefreedictionary.com/Iterable.
+
+****************************************************************
+
+From: Martin Dowie
+Sent: Thursday, April 14, 2011  3:08 AM
+
+Some 'weak' evidence in favour of Christoph's suggestion...
+
+Google hits:
+Iterable: about 262,000
+Iteratable: about 14,000 (and Google offers results for Iterable instead)
+
+Loads of Java, Scala, Android, Boost references to Iterable, so seems to be the
+de facto standard English word for this context.
+
+****************************************************************
+
+From: Bob Duff
+Sent: Thursday, April 14, 2011  6:34 AM
+
+> The new chapter 5.5.1 uses the new term iteratable_name.
+
+I haven't looked at a dictionary, and I don't know Latin, but to my ears
+"iterable" sounds right, "iteratable" sounds wrong.
+
+Consider "irritable".
+
+****************************************************************
+
+From: David C. Hoos, Sr.
+Sent: Thursday, April 14, 2011  6:45 AM
+
+http://hyperdictionary.com/search.aspx?define=iterable yields this (from
+Webster's 1913 dictionary)
+
+\It"er*a*ble\, a. [L. iterabilis. See {Iterate}.] Capable of being iterated or
+repeated. [Obs.]
+
+****************************************************************
+
+From: Georg Bauhaus
+Sent: Thursday, April 14, 2011 10:22 AM
+
+> The new chapter 5.5.1 uses the new term iteratable_name.
+>
+>
+>
+> I think from the Latin origin, iterare, to walk,
+
+(that would be ire. ;-)
+
+William Whitaker's Latin WORDS to the rescue.
+
+First, "iterare" exists and means
+
+"do a second time; repeat; renew, revise;"
+
+
+For iterabilis, the program prints
+
+"Two words
+May be 2 words combined (itera+bilis) If not obvious, probably incorrect
+bilis                N      3 3 NOM S F
+bil.is               N      3 3 GEN S F
+bil.is               N      3 3 ACC P F                   Early
+bilis, bilis  N    F   [XXXBO]
+gall, bile; wrath, anger, indignation; madness, melancholy, folly;
+iter.a               V      1 1 PRES ACTIVE  IMP 2 S
+itero, iterare, iteravi, iteratus  V   [XXXCX]
+do a second time; repeat; renew, revise; *"
+
+Admirable.
+I guess, then, that iterable_item is a correct neologism.
+
+****************************************************************
+
+From: Tucker Taft
+Sent: Thursday, April 14, 2011  11:24 PM
+
+I agree iterable is probably better. Enumerate becomes enumerable,
+so it would make sense for iterate
+to become iterable.
+
+****************************************************************
+
+From: John Barnes
+Sent: Monday, April 18, 2011  4:29 AM
+
+I did see the Ada-Comment stuff. Yes. It should be iterable.
+
+Misuse of English makes me irritatable.
+
+****************************************************************
+
+From: Florian Weimer
+Sent: Monday, April 18, 2011  11:32 AM
+
+> Loads of Java, Scala, Android, Boost references to Iterable, so seems
+> to be the de facto standard English word for this context.
+
+It's also easier to type because it's fairly obvious there is no letter "e"
+somewhere in the middle, so please go with "iterable", especially if it is
+exposed in some way to the programmer.
+
+****************************************************************
+
+!topic Implicit_Dereference
+!reference AI05-0139-2
+!from Christoph Grein 2011-04-14
+!discussion
+
+If I understand the AI correctly, it will be possible to write
+
+	type Refcounted is abstract tagged private;
+	type Refcounted_Access is access Refcounted'Class;
+
+	type Accessor (Data: access Refcounted'Class) is limited private
+        with Implicit_Dereference => Data;  -- <-- new syntax
+
+	type Ref is tagged private;  -- must be tagged to use AI05-0139-2
+
+	procedure Set (Self: in out Ref; Data: Refcounted'Class);
+	function  Get (Self: Ref) return Accessor;
+
+	My_Refcount (P.Get).I := 42;  -- instead of
+
+	My_Refcount (Get (P).Data.all).I := 42;  -- or
+ 	My_Refcount (  P.Get.Data.all).I := 42;
+
+Is this correct?
+
+****************************************************************
+
+From: Randy Brukardt
+Sent: Thursday, April 14, 2011  5:35 PM
+
+That's the idea. (Presuming "My_Refcount" takes a Data index or parameter.)
+
+I'm now waiting for the other shoe to drop. :-) (Questions like this always seem
+to be a setup for "But, then the following horrible thing could happen!")
+
+****************************************************************
+

Questions? Ask the ACAA Technical Agent