Language

Ada

First appeared
1980
Paradigm
Imperative, structured, strongly typed
Toolchain
GNAT 14.2
Container image
debian:trixie-20261027-slim + gnat-14 14.2.0-19

Ada was designed for the United States Department of Defense by a team led by Jean Ichbiah, and its first reference manual appeared in 1980. It’s named after Ada Lovelace, who wrote what is often called the first computer program. Ada was built for large programs that must not fail, and it still flies in aircraft, runs railway signals, and guides air traffic control. GNAT, the compiler used here, is part of GCC.

Ada spells things out. Blocks end with end if, end loop, and end Main, and every value has a type that the compiler checks strictly. It won’t mix integers and floats, or even two integer types, without a conversion. Arrays can be indexed from any range you choose, and they carry their bounds with them as A'First and A'Last. Containers and sorting are generics: you make a copy for your own types with is new. Crates from Alire, Ada’s package manager, aren’t installed here. The run script turns on most of GNAT’s warnings with -gnatwa and makes each one an error.

Quirks

Concepts in Ada

Run the examples locally

You need Docker and Python 3. The harness builds the pinned container and runs every Ada example:

git clone https://github.com/qnixon/dswithx.git
cd dswithx
python3 harness/run_tests.py --language ada