What is an Abstract Data Type?
In computer science terms, an abstract data type is a complex data structure along with a set of operations, like a stack, a queue, or a binary tree–that is to say, in modern terms, an object. In systems that include include some form of inheritance the word class is usually used instead of abstract data type, but as Snit doesn’t do inheritance, the older term seems more appropriate. Sometimes this is called object-based programming as opposed to object-oriented programming. In Snit, as in Tk, a type is a command that creates instances — objects — which belong to the type. Most types define some number of option which can be set at creation time, and usually can be changed later. Further, an instance is also a Tcl command–a command that gives access to the operations which are defined for that abstract data type. Conventionally, the operations are defined as subcommands, or instance methods of the instance command.