Ada 2005 Overview

Mutually Dependent Package Specifications

Ada users have long been asking for a way to have mutually dependent types that can be declared in independent packages. A new form of “with” clause, called a “limited with” clause, is proposed to address this need. The “limited with” clause allows packages to create weak dependences on one another, essentially providing an incomplete view of each package’s types. This permits two or more separately compiled types to reference each other via access components. “Limited with” clauses have a natural implementation in source-based compilers such as GNAT, and support for this feature is already available in current versions of GNAT.

Aggregates for Limited Types

As an example of relaxing restrictions to make existing Ada 95 features more useful, there is a revision proposal to allow aggregates to be given for limited types. Limited aggregates would be permitted in contexts where a copy into a preexisting object is not required, such as an actual parameter or in the initialization expression of an object declaration. This feature has been implemented in GNAT.

More Contexts for Anonymous Access Types

Another proposed feature enhancement is to allow the anonymous access type notation (used in Ada 95 for access parameters) to appear in more contexts, permitting constants and record components to be designated as “access”. This will help to reduce the need for explicit access type conversions. This feature has been implemented in GNAT.

Java-like Interfaces

For the object-oriented domain there is a proposal for a simplified multiple inheritance mechanism. During the design of Ada 95’s OOP features there was a conscious decision to avoid multiple inheritance, because of concern with the distributed cost that would be imposed on the use of single inheritance. Since that time, a restricted form of multiple inheritance, sometimes called inheritance of interfaces, has been used to good effect in languages such as Java. This kind of inheritance does not impose the overhead that is incurred by full-blown multiple inheritance in languages such as C++. For supporting this in Ada 2005, the proposal is to have a new form of type called an interface type, similar to an abstract tagged type with no components. A tagged type will be able to inherit from multiple interface types, overriding the operations inherited from each of its parent interfaces

Real-Time and High-Integrity Support

The ARG is also evaluating several proposals in the real-time and high-integrity areas. These include support for task termination handlers, timing events, execution-time clocks, alternative task dispatching policies, and standardization of the Ravenscar restricted tasking profile.

New Pragmas

Several pragmas that have been supported by GNAT for some time are candidates to be added to the Ada standard. Specifically, pragmas Assert, Unsuppress, No_Return, and Unchecked_Union are all viewed as being generally useful and important to standardize to improve portability of Ada programs.

Predefined Library

Extensions are also being considered for the predefined Ada library. Some of the new packages being proposed are in the areas of directory operations, matrix and vector operations, sockets, and for supporting some of the candidate features for the real-time domain. There is also interest in defining a standard set of container libraries, although that may be addressed by a separate standards effort, with some guidance from the ARG.

Share and Enjoy:
  • email
  • LinkedIn
  • Twitter
  • Facebook
  • Digg
  • RSS