Go backward to
Type Equivalence
Go up to
Top
Go forward to
Type-Structure Parameters
Name Equivalence
Complicated in practice:
Primitive types (
intloc
) are always treated equivalent (named by class definition or not).
Each occurence of compound type structures (
array
,
record
) is treated as new type (whether named or not).
Supports "encapsulation"
Procedures parameterized on one type of record structure cannot be abused by giving another.
record
x:
newreal
; y:
newreal
end
record
r:
newreal
; phi:
newreal
end
Straight-forward to implement.
Attach unique integer tag to each compound type-structure expression.
Less natural logic.
No basic problem.
Just fewer programs well-typed.
Author:
Wolfgang Schreiner
Last Modification: May 7, 1998