Why Pascal Doesn't Support ADTs
- Pascal lacks an encapsulation mechanism that forces the programmer
to use only specific procedures when referencing variables
of a given type.
- There is no way to declare variables that persist during
the entire execution of a program without making them globally
accessible to all procedures.
(That is, a global variable lives forever but is globally accessible,
while a local variable has restricted access, but only lives
during the lifetime of the procedure in which it is declared.)
- It isn't possible to group all the information about a type
in one place (since all consts, types, and vars must be declared
together).
- Pascal lacks a language-defined scheme for separate compilation,
so it isn't possible to build a library of data types for use
by any Pascal program.