I’ve been watching the current trend in programming move toward the Object Oriented paradigm for some time now and I still have no idea of what the real differences between Object Oriented Programming (OOP) and procedural programming. I have yet to see an article that compares the differences using an example program. To give an example, here is some text describing OOP:
“An object is essentially a black box that contains internal state information. You send an object a message which causes the object to perform some operation. … One aspect of an object is that you do not have to know what is inside – or how it works – to be able to use it. From a programming point of view this is very handy. You can develop a series of objects for someone to use. If you need to change what goes on inside, the users of the objects should be unaware.”
To me this sounds like someone describing a procedure and not an object. Who really knows the internals of such procedures or functions like fopen or getc. You can take out the word object and replace it with procedure and it would still be make sense.
Wanting to try to give OOP a try, I have been looking for a language for the QL that will do some OOP. I found XLISP for the QL. This version of XLISP is XLISP Plus, which has some object oriented features built in.
One of the documents that comes with XLISP Plus is “XLisp 2.0 Object Primer” by Tim Mikkelsen. This document give an introduction into the object oriented features of XLISP. How Classes, Objects, Messages, and such work. There are a few examples to learn by.
When I first saw this document, I though “Ah, Here is my chance to learn and try out OOP on the QL.” Then the reality of learn Lisp hit me. I have been tinkering with Lisp (along with other non-procedural languages like FORTH) for a few years. I must admit that I really can’t get the hang of the language. I’m too stuck in my iterative thinking and find it a real bear to read Lisp code. So there goes my grand idea of learning OOP. Besides from what I can gather from the examples, I don’t see the advantages it has over procedural programming.
But, for those willing to give it a try the capability is there. If anyone does figure XLisp and OOP out, I hope they will try their best to fill in the rest of us.
While on the subject of Lisp, Scheme (a dialect of Lisp) is also available for the QL. Scheme is an offshoot from Common Lisp (which is what XLisp Plus is based on).