Rationale for Ada 2012

John Barnes
Contents   Index   References   Search   Previous   Next 

8.1 Overview of changes: Containers

The WG9 guidance document [1] specifically says that attention should be paid to
improving the use and functionality of the predefined containers. 
The predefined containers were introduced in Ada 2005 and experience with their use revealed a number of areas where they could be improved.
The following Ada Issues cover the relevant changes and are described in detail in this chapter:
Bounded containers and other container issues
Holder container
Multiway tree container
Syntactic sugar for access, containers & iterators
Queue containers
Compatibility of streaming of containers
Accessors and iterators for Ada.Containers
Problems with queue containers 
These changes can be grouped as follows.
The existing containers are unbounded and generally require dynamic storage management to be performed behind the scenes. However, for high-integrity systems, such dynamic management is often unacceptable. Accordingly, bounded versions of all the existing containers are added (1).
A number of facilities are added to make important operations on containers more elegant. These are the updating of individual elements of a container and iteration over a container (139, 212).
Ada 2005 introduced containers for the manipulation of lists and it was expected that this would provide a basis for manipulating trees. However, this proved not to be the case, so specific containers are added for the manipulation of multiway trees (136). There are versions for unbounded indefinite and unbounded definite trees and for bounded definite trees.
A further new kind of container is for single indefinite objects and is known as the holder container (69).
A range of containers are added for manipulating queues with defined behaviour regarding multiple task access to the queues (159, 251).
The Ada 2005 container library also introduced sorting procedures for constrained and unconstrained arrays. An additional more general sorting mechanism is added in Ada 2012 (1).
Finally, an oversight regarding the streaming of containers is corrected (184).

Contents   Index   References   Search   Previous   Next 
© 2011, 2012, 2013 John Barnes Informatics.
Sponsored in part by:
The Ada Resource Association:


and   Ada-Europe: