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

 

Enforced with SIGNAL ON NOVALUE (and perhaps G.='' et al. as appropriate),
this gives me the lexical scoping I need with the power of tails etc.

 

For those who aren't experience with Rexx: don't overlook the associative
memory aspect of tails!

 

A final note: a friend commented to me re this thread, "Nobody will change
anyone's mind, so it's all just wind." 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.


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to