× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Steve Richter wrote:
From the start I have been using the words "object oriented" as they apply
to a style or programming that is applicable to RPG. I have never understood
what OO is, dont claim to, and after reading Hans's post above, still dont.
People always seem to explain it, just like Hans did, by telling you what it
is not, and never get around to saying what it is.

Thus my comparison to religion! It's been said that the definitive book on Zen never mentions Zen once. In some ways, you need to achieve a sort of enlightenment to understand OO, and then certain things you were taught earlier just don't seem to apply anymore.


I think the problem here is that (IMO) the term "Object Oriented" is somewhat passe, believe it or not. Has been now for perhaps the past decade. Or at least since the publication of "Design Patterns" by the so-called "Gang of Four" (Gamma, Helm, Johnson, and Vlissides) in 1994. That's the definitive book on the subject, and still hasn't been surpassed in the 9 years since publication. The introductory book I recommended in my last post ("Design Patterns Explained") refers to the GoF book extensively.


There is a style of programming that programmers can employ where data is encapsulated in an "object" and then procs which are "oriented" toward the data are called to act on the data. An RPG programmer can employ that style of programming to a degree. I have posted examples of that.

What many people describe as "OO Programming" in ILE is often simply just good programming practice (as someone else here suggested). Some aspects of that good programming practice are more properly called "modular programming".



My interest in this topic is in suggesting how RPG could be improved to permit this style of programming to be more effectivly employed. Procs could be declared as members of a data struct. A data struct could possibly be declared with an "Is a" attribute which would be the equivalent of base classes in C++. Maybe there could be "property get" and "property set" members of a data struct. Not knowing the secrets of ILE, even object access operators ( struct1 >> CustMast // write a rcd to the file ) could be possible.

All of this of course will likely never happen, and if it does, it will not
be released until 2005, by which time most of us will be not working as rpg
programmers.    The "open source the compiler" suggestion, which I concede
also is pointless, is a practical way for needed enhancements to the
language to find there way onto the programmers desktop.

Regarding adding "OO features" to RPG, well, I certainly think about that myself sometimes. But the scenarios always end up more or less the same - an ugly mish-mash of complex features, the type of language Rube Goldberg would be proud of. Or features with unacceptably poor performance. In other words, they'd end up making the language more difficult to use, not easier.


If you're really brave and you want to experiment with an OO-RPG, you can always try the C++ approach. Early C++ compilers were preprocessors that converted C++ code to C code.

As I've said before, if you want to do OO programming, great! But there are already some superb OO languages you can choose from. For learning OO, I strongly recommend Python, along with the previously mentioned books on design patterns.

Cheers! Hans



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.