× 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.



Takken, Cor wrote:
RPG IV is not an object oriented language, Java is. Classes represent
runnable code which can only be used once instantiated as an object
(barred static methods), modules and service programs can be compared to
static (so class-level) methods. Classes are abstract descriptions of
objects, objects are instantiations of classes and represent a class in
a certain state which can behave in a predescribed way (the code in the
class) as is fit for that state. A module is not a class, a module is a
stream of code which can be called from the outside to perform some
functionality and that is it.
<snip>
[W]hile I appreciate
that there are ways to simulate [instantiation-like] behaviour (e.g. copy the same
module to different locations or by renaming the compiled object) that
would still be a simulation and not have the same flexibility as object
instantiation. The whole programming concept of RPG is different from
Object Oriented (or close to Object Oriented) languages as Java, C++,
C#, etc. You can't compare the two except on the bare line to line code
basis (comparing if-statements etc.).

I certainly agree with you that comparisons between classes/objects and service programs can only go so far. I also agree about the flexibility that the OO model provides.

I do however, think that there is some value in the comparison in that both structures help to simplify implementation modular designs, and therefore can be used to accomplish some of the same goals. Well designed service programs can provide encapsulation and ease reuse (thereby reducing maintenance efforts).

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.