As a PL/I bigot, I find some of the design choices that MFC made to be 
unfortunate, and the lack of lexical scoping is one of them, as is flushing the 
stack when a condition is raised and the label is within a do. OOREXX is 
better, but still inherits the same issues. Still, I like REXX for what it 
does, just as I tolerate Perl for what it does and what CPAN has.

It's like choosing an editor; when I have ISPF I miss XEDIT and when I have 
XEDIT I miss ISPF. It would be nice to have a language combining the good 
points or REXX and Ruby, just as it would be nice to have an editor combining 
the good points of ISPF and XEDIT.


--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3

________________________________________
From: IBM Mainframe Discussion List [IBM-MAIN@LISTSERV.UA.EDU] on behalf of 
David Crayford [dcrayf...@gmail.com]
Sent: Saturday, June 26, 2021 2:32 AM
To: IBM-MAIN@LISTSERV.UA.EDU
Subject: Re: Coding for the future

On 25/06/2021 9:03 pm, Jeremy Nicoll wrote:
>> isredit "(LRECL) = LRECL"
>> local lrecl = ispf.vcopy("LRECL")
> Would that place the current file's lrecl in the ispf variable named
> LRECL then copy that value to the lua program's same-named
> variable?
>
> If so, this is a lot more like writing an ispf application in assembler
> than rexx - it may work, but it's a lot more cumbersome having to
> move stuff between one's own local storage and the ispf variable
> pools.


haha, comparing Lua to assembler is a new one on me.  You don't have to
use vcopy. You can bind variables to a table which are lexically scoped.
I prefer this to REXX where the global variable pool is populated
from the ISPF implicit variable pool. I've been burned too many times by
stem variables being polluted by global variables. REXX doesn't support
lexical scoping. The best it has is 'procedure' which is pretty ordinary.
It always makes me sigh when I see circumventions like wacky naming
conventions such as stem.0varname.

There is a chapter in the Lua4z book that introduces Lua to REXX
programmers 
https://secure-web.cisco.com/1Pig7DwuS4yktDr5mUI3h3RiqxXxcN1MmJs5vJeB_MEHBvH4ZgZFJvEboo5Yv0NDr8QRgkwGjqD6a7UGZAHv3yBIbK7Cf1easyUHuEKZufqkfcMivtT1ZBM8-XT6T-Oi-q9DnC6WitMlZUhXWEbdlMTspKqTR9apTjVQBbBcIneaXdO1ss-h1aDBROBdDSoJwIGsilvVL6nNpiEzglF-4mchcIZdhdvAH26jdEPY_b4gR1dfmFu9wMEAx0wiJcAs6-pv_WPHBPQMmPvBN23wy0gPwO7f7jdygL6Hl3NvkPUc6pWCKaUdk1b61F30O2hreYbTTI1OJsC6Qse9RXqv0NST_XnXCsiSp87rgsCNQ8V2qcIVcHlf95ILnWquFYZD80rlY-usSwvTZlXlgNMVtjPbu8mS-93jjMJKwReix04-URiZFscFuRvsaGqLkG8_to0V3iJJH-k1ULw3Xd6KR7Q/https%3A%2F%2Flua4z.github.io%2FLua4z%2Fmanual%2Frexx.md.html.
 One of
the big differences is that Lua supports modules and classes so you can
build
large applications that share state via message passing. If I were to
write an ISPF Lua application I would have a module for each panel
display with the variables encapsulated in the class. You can't do that
in REXX. In fact you
can't even pass a stem variable to a external routine. And stem
variables are extremely limited as REXX doesn't have any form of
introspection. Also, REXX lacks data structures. All it has is stem
variables and stacks.
Stacks are lame, there can only be one active stack at a time. Why
wouldn't they just support named stacks? Lua has libraries for binary
trees, skip lists, linked lists, priority queues etc, etc.

It's not all bad though. I've recently been experimenting with REXX SDSF
shell scripts where I can pipe the output to Python so I can write full
screen curses applications in z/OS UNIX.


----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to