Version 1.1 of ai12s/ai12-0416-1.txt
!standard A.18(2/5) 20-12-08 AI12-0416-1/01
!class Amendment 20-12-08
!status Amendment 1-2012 20-12-08
!status work item 20-12-08
!status received 20-12-08
!priority Low
!difficulty Easy
!subject Fixups from Draft 26 review - part 2
!summary
(1) We clarify the use of the term "container" in the introduction of
the Containers child packages.
!problem
(1) The term "container type" is used in A.18(12/5). But the only definition
is associated with aggregates (see 4.3.5) and that isn't really appropriate
here.
!proposal
(1) Rewrite the basic introductory paragraph to clarify the meaning of
"container" by itself and mention that we can talk about more specific
things as well.
!wording
[Editor's note: These changes were applied to Draft 28 of the Ada 202x RM,
even though they have not yet been approved, in order that that draft be as
accurate as possible.]
(1) Modify A.18(2/5):
A variety of sequence and associative containers are provided. Each container
{package defines}[includes] a cursor type{ as well as a container type}. A
cursor is a reference to an element within a container. Many operations on
cursors are common to all of the containers. A cursor referencing an element
in a container is considered to be overlapping only with the element container
object itself.
AARM Discussion: We use the term "container" alone when it is clear from
context what kind of entity (package, type, or object) that we are talking
about. Otherwise, we use "container package", "container type", or
"container object". Note that "container type" is defined in 4.3.5 for a
different usage; in all of A.18 we mean "container type" to be one of the
primary types declared in the child packages of package COntainers, such as
Vector, List, or Map.
!discussion
(1) The term "container" appears to be used to mean whatever is convinient in
paragraph A.18(2/2). The first sentence sounds like it could mean any of
package/type/object. The second sentence only makes sense for a package
(nothing is "included" in a type or object). The third sentence works for a
type or object, but not a package (can't reference an element in a package,
only within an object or [abstractly] a type). The fourth sentence is like
the first.
We try to clarify the meaning a bit. It probably would be better to have a
more extensive terminology paragraph before this one, but even if we did that,
this one would need to be less vague.
We use the terms "container type" and "container package" in other wording,
and it is best to introduce them early.
!corrigendum A.18(2/2)
Replace the paragraph:
A variety of sequence and associative containers are provided. Each container
includes a cursor type. A cursor is a reference to an element within a
container. Many operations on cursors are common to all of the containers. A
cursor referencing an element in a container is considered to be overlapping
with the container object itself.
by:
A variety of sequence and associative containers are provided. Each container
package defines a cursor type as well as a container type. A cursor is a
reference to an element within a container. Many operations on cursors are
common to all of the containers. A cursor referencing an element in a container
is considered to be overlapping only with the element itself.
!ASIS
No ASIS effect.
!ACATS test
No ACATS Tests needed.
!appendix
From the RM Review of Jean-Pierre Rosen, October 2020
A.18(12/5)
For an instance I of a container package with a container type C,
the specific type T of the object returned from a function that
returns an object of an iterator interface, as well as the primitive
operations of T, shall be nonblocking. The Global aspect specified
for T and the primitive operations of T shall be (in all, out
synchronized) or a specification that allows access to fewer global
objects.
I find this paragraph strange. What is a "container type"? The type on
which the container is instantiated? Then it would rather be the
contained type... And "C" is not referred to anywhere.
****************************************************************
Questions? Ask the ACAA Technical Agent