Ada In Practice
This course explores how to use the Ada language in real-world scenarios that extend beyond the complexity of lab exercises. The resulting solutions to these scenarios are idioms and techniques, some common to various programming languages and some specific to Ada. Multiple preliminary solutions to a given scenario (when they exist) are presented and analyzed for strengths and weaknesses, leading to the final preferred solution and its analysis. As a result, readers — especially those relatively new to the language — can learn how experienced Ada developers apply the language in actual practice. Prior knowledge of Ada is required, although explanations of the underlying semantics are provided when appropriate.
This document was written by Patrick Rogers and reviewed by Gustavo A. Hoffmann, Steven Baird, Richard Kenner, Robert A. Duff, and Tucker Taft.
Note
The code examples in this course use an 80-column limit, which is a typical limit for Ada code. Note that, on devices with a small screen size, some code examples might be difficult to read.
Contents:
- Introduction
- Essential Design Idioms for Packages
- Abstract Data Types
- Abstract Data Machines
- Programming by Extension
- Constructor Functions For Abstract Data Types
- Controlling Object Initialization and Creation
- Type Punning
- Expressing Inheritance Idioms
- Providing Component Access to Enclosing Record Objects
- Interrupt Handling
- Reducing Object Code from Generic Package Instantiations
- Resource Acquisition Is Initialization (RAII)
- Using Streams for API Flexibility
- Dealing with Silent Task Termination