Obervation on Object Oriented Opinion @section{Introduction} @section{Definitions} @subsection{Object} An Object can operationally be defined as simply a record. That is, it contains a number of values, each accessable through a name. These values may be anything with the language can describe, but can usually be at least references to other objects and procedures. The various attributes may be fixed or changeable (constant or variable). The visibility of the attributes may also be restricted in various ways, with some attributes being visible to all procedured, and others being visible only to selected procedures. We will use the term @samp{operation} to refer to procedures which are fixed attributes of objects, and to which all attributes of the associated object are visible. An operation is really more than the procedure, it is the combination of the procedure and the object which it is an attribute of. Many different objects could have the same procedure as an attribute, and each pairing would make a different operation. @subsection{Class} A class is a special kind of object. @itemize @item It has an operation called @samp{new} which returns a new object. All objects returned by the @samp{new} operation of a specific class will have the same set of attributes with the same mutability and visibility properties. The initial values will normally be the same from object to object, though arguments to the @samp{new} operation or state within the class may vary these initial values. @item Classes are "created" by the program text and so exist from the very commencement of program execution. As such they can and do have unique names in the global namespace of the program. @end itemize To help provide confusion, the term "class" is often used to mean the collection of all object that are or could be returned by the @samp{new} operation of some class object. The term "The class of" an object refers to the class which created the object. @subsection{Extension} Object extension is the process of adding attributes to an object. ...... @subsection{Types and polymorphism} We can say that a procedure @samp{expects} an object passed as an argument to behave in a certain way. The expectation may be explicit, or implicit. An implicit expectation might be that a procedure attempts to access a particular attribute of the object. This implies an that the procedure expects the object to have a value for that attribute. The collection of expectations that a procedure places on an argument object is termed the @def{type} of the argument. A type may place expectations on the attributes which are visible, and on the types of the values of those attributes. An object can be said to @def{conform} to a type when it meets all the expectations of that type. A class can be said to @def{support} a type when all of the objects that its @code{new} operation creates will always conform to that type. @def{Polymorphism} is the exploitation of the observation that objects of several different classes may well conform to a particular type, and so a procedure may be written which will work with any of a number of differently shaped object (from different classes) providing that they all conform to a partcular type. The view of types as "expectations of behaviour" allows for a very broad understanding of types as it puts them very much in the realm of the programmers mind. Some languages (those referred to as dynammically types) are happy to leave them soley in that realm. Others try to encode part of the expectation so that conformance may be automatically checked by the compiler, or at least communicated to other programmers. @subsection{Inheritance} Inheritance is a notational convenience for describing classes. Rather than giving a complete description of a new class, the new classes is described as being a blend of some number of other classes together with some new information. That is clearly an workable vague description. To be more precise, we will consider a class to involve primarily the @code{new} operation which in turn is primarily concerned with declaring the name and nature of the attributes in a created object. In that context, inheritance involves saying that the attributes for new object of this class are the union of the attributes of new objects of some other classes, with some modification. The modification could involve adding further attributes, deleting attributes, or changing the intitial value of some attributes. @subsection{Virtual Classes} @section{Interpretation} class variables ... @section{Theory} @subsection{types}