On 15/05/2018 1:52 AM, Phil Smith III wrote:
Charles wrote, in part:
I wrote a large set of applications in Rexx once. I put all of my "intended
to be global" variable names into a single Rexx variable and exposed it
with
Procedure Expose (Rexx_Globals)
Yep. That's one of the approaches; I've used that, also used a set of stems:
G.
U.
D.
(whatever, but often segmented that way-for example, G. might be global
configuration settings; U. be user data; D. might be, well, data data!).
This strongly suggests being rigorous with tail naming: I use leading
underscores for non-variable tails:
G._Logging
and then never use any local variables with leading underscores (yes,
_Logging is a valid variable name). An easy convention to follow, and makes
it easy to tell the difference between:
U.settings
(which will substitute the tail, and
U._settings
A common technique with the use of the underscore to reserve the
namespace. Inadvertently clobbering a stem identifier with a local
variable is a common and confusing error.
Unfortunately, it doesn't take long before those expose lists start to
telescope. A case in point is the ISPF DTL compiler which is 40,000
lines of REXX code.
It's not uncommon to see functions like this:
SL_STag:
Procedure Expose Global. Panel. Globalw. Help. Info. olist. ,
obuf orec i m Logbuff.
And variables like "Global.PS_lclvar.jk.jl.jz.H".
Urrgghh, someone hand me a bucket!
A final note: a friend commented to me re this thread, "Nobody will change
anyone's mind, so it's all just wind."
Yep. Our opinions have been forged over decades and the majority of us
are too long in the tooth to change.
Well, sorta. But it's useful,
perhaps, to discuss these issues and at least understand the other folks'
perspective. Rexx isn't perfect, isn't the right hammer for all nails. But
for what it was designed to do, it's pretty darned good. Perl is (arguably?)
one step along the track toward a "real" programming language, but it's also
not as well suited for what Rexx was designed to do - be an interface for
operating system commands.
Perl was displaced well over a decade ago by Python and Ruby which are
currently used to write the back-ends of the likes of Instagram,
Spotify, Dropbox and Github. Python has
become the language de jour for data scientists for machine learning.
Streaming behemoths like Netflix are swapping out racks of Java
application servers and
replacing them with single Node.js instances. That's right JavaScript!
Scripting languages have come a long way since Perl and are in a
completely different universe
now to when classic REXX was the new kid on the block.
The good news is that those languages are starting to arrive on z/OS.
Maybe not for the oldies but definitely the next generation who will be
supporting the old dog in the decades to come.
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN