Alexandre E. Kopilovitch
Fri, 14 Feb 2003 02:11:21 +0300
>I consider Ada packages as static (non-instantiable) classes, where children
>inherits their static nature.
> Does that make sense ?
Too narrow sense. Although you do not instantiate non-generic packages (if you
do not treat "with" clause as a kind of instantiation), you may instantiate
new types from them, deriving from private types declared in those packages.
Look at the difference between "new" in C++ and "new" in Ada. "new" in C++
is run-time action, which produces new copy of object of the class, while
"new" in Ada is compile-time action, which produces new type, and that new
type is neither subtype nor supertype of original type... but it is defined
by the same package as the original type.