Comparison with procedure-based programming inheritance
- Last Updated: February 15, 2019
- 1 minute read
- OpenEdge
- Version 13.0
- Documentation
You can also define a form of inheritance with procedure
objects using super procedures. A set of related super procedures
can act in much the same way as a class hierarchy. One internal
procedure can invoke another internal procedure of the same name
in its super procedure with the RUN SUPER statement, or
similarly for user-defined functions using the SUPER built-in
function. The key difference between the use of super procedures
and a class hierarchy is that the super procedures are related only
at run time. ABL has no way to anticipate or validate the interactions
between the procedures, and must search the procedure stack to determine
if a "super" version of a procedure exists, and where. By contrast,
the compiler can validate every reference from one class to another
in the same hierarchy, which can then be established reliably at
run time.