Objects and Classes
- Object:
- Declared variable of a record-structure block.
- Centerpiece of object-oriented languages.
- Record field = object methods.
- Embedding of classes:
- class EXTENDED-STACK =
begin
var M: PERSONAL-STACK,
var N: newint
in record
...
proc PUSH-EXTENDED(X: intexp) =
call
M.PUSH(X)
...
end end
Forwarding of method invocations becomes tiresome!
Author: Wolfgang Schreiner
Last Modification: May 14, 1998