The representation itself, constructor, selectors, settors are private and cannot be accessed or used except inside the functions defined within this cluster. Allocation of instances is performed automatically by the constructor function. The client of an ADT is not supposed to know or care about its internal implementation details - only about its exported interface . Thus, it makes sense to separate the textual description of the interface from that of the implementation, e.g., into separate files. For example, Ada distinguishes package specifications from package bodies , and encourages them to be in separate files.
Specifications give the names of types, and the names and types of functions in the package.
Bodies give the definitions of the types and functions mentioned in the specification, and possibly additional private definitions. Although the idea of defining explicitly all the operators for a type makes good logical sense, it can get quite inconvenient. As programmers we're used to being able to assign values or pass them as arguments without worrying about their types. We may also expect to be able to compare them , at least for equality, without regard to type. Thus, most languages that support ADT's have built-in support for these basic operations, defined in a uniform way across all types.