Well, I'm a programmer, and I believe that the behavior of uninitialized
variables makes pefect sense when using REXX as a CMS scripting language. The
things that I would change are:
1. Not matching the operand of an end against the label of a DO.
and, no, matching it against the control variable is not the same thing.
2. Not allowing optional DECLARE statements.
3. The exception model.
4. Lexical scope.
That said, it's still my preferred scripting language, although these days that
means orexx everywhere but z/OS.
--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3
________________________________________
From: IBM Mainframe Discussion List [[email protected]] on behalf of
Phil Smith III [[email protected]]
Sent: Monday, March 27, 2023 6:01 PM
To: [email protected]
Subject: Re: Stop the ragging on COBOL please
Michael Schmitt wrote, in part:
>REXX is so much better but I want to ask Mike Cowlishaw
>what he was thinking in making uninitialized variables
>default to their own name.
While as a programmer I agree with you, I'm pretty sure I know the answer:
Rexx was designed to be usable by non-programmers, who would not be expected
to understand what's a variable and what's not. In this model, a Rexx EXEC
is closer to a list of commands (hmm, whatever could we call such a
language?) than a program. Remember, VM was the original personal computing
environment, long before PCs.
As for whether he ultimately regretted the decision or not, I could ask him
but I suspect the existence of SIGNAL ON NOVALUE is an answer of sorts. And
SIGNAL ON NOVALUE-especially with the ability to trap it and report what the
variable was-is a perfect programmer-y answer, no? And thus fits the model
of non-programmers being the target/default user.
----------------------------------------------------------------------
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