Object Oriented Programming


syrakusos

Recommended Posts

Adam Reed's 2003 article in JARS is archived here: http://web.augsburg.edu/~crockett/210/210%20Lab%20Set%204/Reed_OOP_Epistemology.pdf

It came up on the "Galt's Gulch" discussion board where most people just toasted Fortran and called OOP a commie plot. I have had the essay on my computer for several years, browsed though it "yeah, yeah, uh-huh, uh-huh" but the other day I took it to Office Max and had it printed off so that I could read it and mark it up.

Does anyone else here actually know the work?

Thanks!

Link to comment
Share on other sites

I read the paper long ago. As the title indicates, his aim was to draw parallels and implications between OOP and Objectivist epistemology. I thought it was okay but thought the following were shortcomings.

Reed wrote: "The main benefit of inheritance techniques is cognitive economy: that which is already known about instances of one concept by virtue of its CCD with a second, may be re-applied to the second concept rather than developed from scratch."

The economy of OOP is more than mere inheritance. OOP objects are reusable by other programs. You might recall that procedural languages typically allowed subroutines that could be called at different points within the main program. However, a subroutine in program X could not be called by program Y. Doing the same thing in Y would require replication of the subroutine within Y. In contrast, if what the subroutine does is built into an OOP object, then programs X, Y, Z and more can all use the same code. This is an obvious advantage for maintenance. In a procedural venue, if the subroutine needs revision, revision needs to be done in multiple programs. In an OOP venue, revision is often needed in only one place. (That is not true in every OOP case. If the inputs/outputs (often called "arguments") sent back and forth between programs change, then there is more maintenance.)

Reed wrote: "In contrast to procedural, applicative, and declarative programming languages, which are based on the tacit event-state-event-state conception of causality,object-oriented languages implement the Aristotelian view of causality: that entities act according to their identity."

That wouldn't be my approach to describe the difference between procedural and OOP languages. Beside the subroutine difference, mine would be that OOP allows creating new data types, whereas procedural languages don't. New data types are made by combining primitive data types (ones offerred by the language, such as integer number, floating decimal number, string, scalar, array) into one OOP object. Thus OOP allows better code organization.

In Table 1 Reed likens abstraction in OOP to Objectivist epistemology as follows:
Member Variable of an Object - Attribute of an Entity
Value of Member Variable - Measurement

Reed used "measurement" very loosely here, like he has done elsewhere and often. Any difference whatsoever is dubbed a "measurement." For example, chocolate, vanilla, strawberry, and butter pecan are "measurements" of ice cream flavors. There are no mere qualitative differences.

Link to comment
Share on other sites

There were several attempts to separate interfaces from executions prior to OOP. I don't think it really had anything to do with Objectivism. The idea was to make the interfaces to subroutines and sub-processes separate from the underlying implementations of the routines. That way when the implementations were improved people could still call the subroutines in the way they had learned. It made mantaining software much less expensive and disruptive.

Nikloaus Wirth who designed the language Pascal produced Modula which enabled the separation of procdure interface from procedure implementation. This was developed just before the object oriented languages caught the attention of the software community. Object oriented code neatly separates method from implementation and thus can promote software systems that can be improved without breaking existing applications.

As far as I can tell, the separation approach had no explicit connection with Objectivism or Rand.

Ba'al Chatzaf

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now