The hardest thing to understand in OO is the scope you are in and that
scopes executes asyncrone - like Nathan I wouldn't like RPGLE to have full
OO capabilities, there is no need for it.
/Henrik
Nathan Andelin <nandelin@xxxxxxxxx>
Sent by: web400-bounces@xxxxxxxxxxxx
20-04-2010 19:48
Please respond to
Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>
To
Web Enabling the AS400 / iSeries <web400@xxxxxxxxxxxx>
cc
Subject
Re: [WEB400] Why use PHP? What are the disadvantages?
From: Neill Harper
So why isn't there a demand for OO RPG, I want it ;-)
I would REALLY prefer that IBM NOT make RPG a fully OO Language!
Procedural interfaces are better for a business oriented language, IMHO.
Notwithstanding the foregoing, Barbara Morris shared a little technique a
number of years ago, which I've used extensively. OO languages generally
use the "new" keyword to instantiate new objects, which encapsulate
properties and methods. As an alternative, consider doing something like
the following in RPG:
myPointer = myObjectNew();
Where myObjectNew() creates a new instance of a data structure, using
%alloc(), and returns a pointer to it. That data structure represents a
new instance of your object. All other procedures in the service program
reference a particular instance of that data structure via "myPointer".
For "inheritance" purposes, consider writing service programs which are
essentially wrappers around other service programs, but provide
successively higher levels of abstraction.
Forget "polymorphism", it's not worth it.
Just suggestions,
-Nathan.
As an Amazon Associate we earn from qualifying purchases.