In particular, when new types are given a representation in terms of existing types, it shouldn't be possible for programs to inspect or change the fields of the representation. Ideally, 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.
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. Programmers are used to assigning values or passing them as arguments without worrying about their types. They may also expect to be able to compare them , at least for equality, without regard to type. So most languages that support ADT's have built-in support for these basic operations, defined in a uniform way across all types.