On Thu, May 9, 2024 at 12:04 PM (WalzCraft) Jerry Forss
<JForss@xxxxxxxxxxxxx> wrote:
What do you think is a better approach.
Learn it from the perspective of running on the IBMi and that port that knowledge to the rest of the world, or.
Learn it from the perspective the rest of the world and port that over to the IBMi?
Is there really much difference?
In my opinion, there is a noticeable difference. Whether it's "much"
probably depends on the individual.
If you have almost any level of prior experience programming on
non-IBM platforms, you are probably most of the way toward the second
approach already.
I have to stress that there isn't a "wrong" way to go; you will get a
lot out of learning Python regardless.
But in my opinion, to the extent that there is a difference (and
remember, for some individuals, there will be very little) it is
generally better to learn "rest of the world" Python, and then apply
it to Python on IBM i.
Why do I say this?
(1) Because virtually all the learning resources and tooling have been
developed on and for mainstream platforms (Linux, Windows, Mac). Now
that IBM has released yum-installable Python for PASE, there will be
relatively little difference between Python on other platforms and IBM
i. But to the extent that there are differences, I think it's nice to
know which stem from the peculiarity of the IBM i, and the better way
to learn those is to learn rest-of-world Python "first" or "mainly".
(2) You can use Python productively from your local workstation, both
for work that depends on your connection to the i and for your own
local tasks. Even for Python running *on* the i, you'll need a
"connection" from PASE into the native IBM i environment, and the very
same methods used to connect to the i from PASE are the ones used to
connect to the i from the computer on or under your desk. So there's
virtually no reason NOT to start with Python on your local machine.
(3) I think you will get the most out of Python if you can reset your
programming mindset. You don't want to miss out on, or not fully
leverage, features of the language that are just so foreign to RPGLE
that they wouldn't even come up if you retain your existing mindset.
If you can, I recommend trying to learn "native speaker" Python as
much as possible, rather than "heavy RPGLE accent" Python.
I am thinking I might take some of my web service applications (RPGLE) and create the Python version.
You may find that a from-the-ground-up Python version is ludicrously
shorter, quicker, and easier than the "corresponding" RPGLE. If you
just try to replicate your existing code using the closest possible
Python syntax, you will probably not leverage Python nearly as much as
you could. I'm saying it's worth the rewriting exercise, just that
again, you'll get the most out of it by thinking in Python, rather
than thinking in RPGLE and translating to Python.
John Y.
As an Amazon Associate we earn from qualifying purchases.