On Tue, Feb 12, 2013 at 12:13 PM, Jon Paris <jon.paris@xxxxxxxxxxxxxx> wrote:

On Tue, 12 Feb 2013, at 11:18:25, John Yeung <gallium.arsenide@xxxxxxxxx> wrote:

But you can do the same with Python. Once you have appropriately
wrapped the relevant APIs, it's easy from then on. I would argue that
it is easier to use well-wrapped functionality in Python than
well-wrapped functionality in RPG, and Python's advantage grows the
more complex and dynamic the functionality.

I just don't understand this statement. If I wrap the User Space pointer
retrieval in a subproc then once that procedure has been called all
subsequent access to data in the space is indistinguishable from
accessing any other data within the program. How can it get any
easier than that?

First of all, my comment was intended to refer to arbitrary
functionality, not just user spaces. I still think it's arguably
easier to get data into and out of user spaces with Python, but this
is largely a matter of familiarity and preference. And the difference
is perhaps not very big regardless.

But there are things that are just grotesquely difficult in RPG that
are quite easy in Python. If, for example, your user space contained
a serialized representation of an associative array that mapped tuples
to sets of tuples, you could slurp this up into built-in Python data
structures lickety split. I don't even know how to go about setting
that up in RPG. Anything object-oriented or requiring dynamic
resizing is absolutely going to be easier in Python than RPG.

Now, I'm not saying that your everyday business logic is going to have
anything like that. For everyday business logic, RPG is usually a
great fit. But "indistinguishable from accessing any other data" in
RPG means you can only get it to be as easy as RPG can get.
(Tautological, I know.) For some things, RPG just doesn't get very
easy, even at its easiest.


This thread ...


Return to Archive home page | Return to MIDRANGE.COM home page