Object Orientation as supplicative programming.
January 16, 2012How does OO relate to the other fundamental paradigms, imperative (eg procedural) programming, and declarative
eg. logic) programming?
Once you have encapsulateddata, you cannot run imperative commands on it, because the command
would just override the encapsulation. Instead, the object or server
the data is encapsulated receives a message, and acts on it, or not,
or reinterprets it: encapsulation means the encapsulaters of data
have the final say. This is true even in typical RDBMS applications,
where the structure of the data is exposed, but the encapsulater, the
database, can block or modify requests with the trigger mechanism.
Supplication is also the Achilles heel of “OO”: you can’t tell what
a call, or use of code, is doing by inspecting it: the receiver of
the request could do something inappropriate with it. No wonder
the idea of “contract” is important in OO. The client needs guarantees
that its requests will do something like what is expected.
Leave a comment