I don't believe I've actually used a stack in 50 years of (mainly real-time, control systems) programming. Part of the reason for there being no standard Ada.Containers.Stacks
might be that educators would lose one of the introductory topics in a Data Structures For Beginners course :-)
The AI that introduced the Containers states that
[it] provides a number of useful containers for Ada. Only the most useful containers are provided. Ones that are relatively easy to code, redundant, or rarely used are omitted from this set, even if they are generally included in containers libraries
and that
You can use a vector to implement a stack in the traditional way:
package Stacks is new Ada.Containers.Vectors (ET);
use Stacks;
Stack : Stacks.Vector;
procedure Push (E : in ET) is
begin
Append (Stack, New_Item => E);
end;
function Top return ET is
begin
return Last_Element (Stack);
end;
procedure Pop is
begin
Delete_Last (Stack);
end;
which then gives the opportunity to create bounded stacks and to pre-allocate unbounded stacks if appropriate (i.e. you know the typical maximum depth but want to allow for deeper ones occasionally).