Ada Programming/Ada 2012
This is an overview of the major features that are available in Ada 2012.
Summary of what's new
editNew syntax
editAdded 4 forms of expressions:
- conditional expressions
- case expressions
- quantified expressions
- expression functions
These additional expressions originated with new support for contract based programming.
New keywords
editAdded 1 keyword (73 total)
New pragmas
editAdded 5 pragmas:
pragma
CPUpragma
Default_Storage_Poolpragma
Dispatching_Domainpragma
Independentpragma
Independent_Components
Note that all these pragmas except Default_Storage_Pool born obsolescent, and it is recommended to use them as aspects instead.
New aspects
editAspect specifications is a new feature of Ada 2012. While some aspect identifiers are completely new, others were present in previous versions of the language as aspect-related pragmas or attribute-definition clauses. Note that for these pragmas, in some cases the old pragma identifiers are marked as obsolescent, while in other cases the usage of the pragma is still the recommended approach.
Added 18 aspects:
- Constant_Indexing
- CPU (also added as an obsolescent pragma)
- Default_Component_Value
- Default_Iterator
- Default_Storage_Pool
- Default_Value
- Dispatching_Domain (also added as an obsolescent pragma)
- Dynamic_Predicate
- Implicit_Dereference
- Independent (also added as an obsolescent pragma)
- Independent_Components (also added as an obsolescent pragma)
- Iterator_Element
- Post
- Pre
- Static_Predicate
- Synchronization
- Type_Invariant
- Variable_Indexing
Aspect specifications already present in previous versions of the language as pragmas:
- All_Calls_Remote
- Asynchronous (pragma now obsolescent)
- Atomic (pragma now obsolescent)
- Atomic_Components (pragma now obsolescent)
- Attach_Handler (pragma now obsolescent)
- Convention (pragma now obsolescent)
- Elaborate_Body
- Export (pragma now obsolescent)
- External_Name
- External_Tag
- Import (pragma now obsolescent)
- Inline (pragma now obsolescent)
- Interrupt_Handler (pragma now obsolescent)
- Interrupt_Priority (pragma now obsolescent)
- Link_Name
- No_Return (pragma now obsolescent)
- Output
- Pack (pragma now obsolescent)
- Preelaborate
- Priority (pragma now obsolescent)
- Pure
- Relative_Deadline (pragma now obsolescent)
- Remote_Call_Interface
- Remote_Types
- Shared_Passive
- Storage_Size (pragma now obsolescent)
- Unchecked_Union (pragma now obsolescent)
- Volatile (pragma now obsolescent)
- Volatile_Components (pragma now obsolescent)
Aspect specifications already present in previous versions of the language as attribute definition clauses:
- Address
- Alignment
- Bit_Order
- Component_Size
- Input
- Machine_Radix
- Read
- Size
- Small
- Storage_Size
- Storage_Pool
- Stream_Size
- Write
New attributes
editAdded 5 attributes:
New packages
edit- Multiprocessing:
- Real-time:
- OS facilities:
- Iterators:
- Text handling:
- Container library:
- Ada.Containers.Multiway_Trees
- Ada.Containers.Indefinite_Multiway_Trees
- Ada.Containers.Indefinite_Holders
- Ada.Containers.Bounded_Vectors
- Ada.Containers.Bounded_Doubly_Linked_Lists
- Ada.Containers.Bounded_Hashed_Maps
- Ada.Containers.Bounded_Ordered_Maps
- Ada.Containers.Bounded_Hashed_Sets
- Ada.Containers.Bounded_Ordered_Sets
- Ada.Containers.Bounded_Multiway_Trees
- Ada.Containers.Synchronized_Queue_Interfaces
- Ada.Containers.Unbounded_Synchronized_Queues
- Ada.Containers.Bounded_Synchronized_Queues
- Ada.Containers.Unbounded_Priority_Queues
- Ada.Containers.Bounded_Priority_Queues
See also
editWikibook
editPages in the category Ada 2012
editExternal links
edit- www.ada2012.org, website maintained by the Ada Resource Association.
- Ada Answers: Ada 2012
- ISO/IEC JTC1/SC22/WG9 N498 (2009). Instructions to the Ada Rapporteur Group from SC22/WG9 for Preparation of Amendment 2 to ISO/IEC 8652
Papers and presentations
edit- Towards Ada 2012: an interim report from the Ada Rapporteur Group, by Ed Schonberg (2010-06-17)
- HD Video: An introduction to Ada 2012, presentation by Ed Schonberg (1h 02 min, 2012-10-16)
Rationale
editAda Reference Manual
edit- Ada Reference Manual, ISO/IEC 8652:2012(E) — Language and Standard Libraries
- ISO/IEC 8652:2012 — Information technology — Programming languages — Ada (2012-12-10), same contents as the above link.
- Annotated Ada Reference Manual, ISO/IEC 8652:2012(E) — Language and Standard Libraries (colored diffs)
- List of Ada Amendment drafts
Ada Issues
editImplementations
edit- Implementation of Ada 2012 Features in GNAT compiler
Press releases
edit- Ada 2012 Language Standard Approved by ISO, by Ada Resource Association & Ada-Europe (2012-12-18) PDF
- Ada 2012 Language Standard Submitted to ISO, by Ada Resource Association & Ada-Europe (2012-06-12) PDF