On 14/05/2018 3:16 AM, Seymour J Metz wrote:
OOREXX solves many of the problems in classic REXX.


And it retains many of them. Like being typeless and lacking lexical scoping.


I never found writing REXX function packages to be difficult.


Maybe not difficult for some but it's significantly more complex when compared to writing language bindings for modern languages. You have to write some of the code in Assembler whether you like it or not. If you require an LE environment you have to write glue code using CEEPIPI. For most of the stuff I'm interested in I require LE because I want to bind C++ libraries. REXX function packages seem promising but retaining state is tricky and requires stashing an environment pointer using name/token services. Not to mention function names are limited to a maximum of 8 characters! Better to use a command processor environment, but then you have to write a command parser. Been there, done that it's a lot of work.

Now compare that to Lua where the entire I/O package in the standard library is less than 1000 lines of code [1]

[1] https://github.com/lua/lua/blob/master/liolib.c*.*


I don't care for Perl syntax, but between its expressive power and the massive 
CPAN I find myself using it regardless.


I can do without the expressive power of Perl! It shone briefly as a CGI language and it's good for text processing but with the emergence of powerful PEG parser libraries [1] I can easily do more with less using much cleaner languages.

[1] http://www.igordejanovic.net/Arpeggio/grammars/
      https://github.com/pegjs/pegjs
      http://www.inf.puc-rio.br/~roberto/lpeg/
      https://github.com/evanphx/kpeg


That said, I find that REXX has a much cleaner syntax for scripting OS commands


Agreed. Processing command strings is much cleaner in REXX then any other language I know. But not by much.



--
Shmuel (Seymour J.) Metz
http://mason.gmu.edu/~smetz3
http://www.rexxla.org/Newsletter/9812safe.html
http://www.rexxla.org/Newsletter/9901safe.html


________________________________________
From: IBM Mainframe Discussion List <[email protected]> on behalf of David 
Crayford <[email protected]>
Sent: Friday, May 11, 2018 10:09 PM
To: [email protected]
Subject: Re: Heretic alert: I really detest TSO REXX (the language)

On 12/05/2018 6:23 AM, Tony Thigpen wrote:
Come comments on other posts:

David Crayford wrote on 05/11/2018 02:22 PM:
The fact that REXX does not have native support for VSAM
data sets is a shocking omission.
This is available on s/VSE.

z/VM and z/VSE seem to have lots of features that z/OS lacks, like pipes.

David Crayford wrote on 05/11/2018 02:22 PM:
Lack of variable scoping is one of my biggest gripes. It means
REXX doesn't scale. Of course, you can add "procedure expose"
to functions but that soon turns into an intractable mess.
I disagree. This sounds more like you are trying to use programming
habits/methods designed for another language. Any programming
'language' should be used as it was designed, not as some other
'language' was designed. Are you trying to make REXX look like Perl,
Java, PHP or bash?

Not at all! My opinion is based upon 30+ years of using REXX. The
inability to pass aggregate types (objects) in REXX (stem variables) to
functions makes it unsuitable for large programs. This is especially
true for external functions.
REXX also lacks modules or packages so reusing code is hard. The "expose
stem." construct doesn't cut it IMO. Once the code grows large it takes
a lot of mental gymnastics to remember what's been exposed. Lexical
scoping is
an absolute must in modern programming languages.

David Crayford wrote on 05/11/2018 02:28 PM:
Perl excels at one thing, regular expressions. Its syntax is ugly
and it suffers from language bloat.
I equate regular expressions with vi. It takes a lot of use to get
where you can use it without looking things up, and if you get to that
point, you have lived a hard life. :-)
I have to admit that the parse instruction in REXX is elegant and one of
it's redeeming features. But it lacks the power of regular expressions.
I missed regular expressions in REXX so much I wrote a command processor
[1].
Extending REXX is difficult and requires writing assembler code. In the
case of my regex API I needed to use CEEPIPI to glue together the
assembler code and LE C++ code. Extending languages like Python, Ruby,
Lua, Node.js
is trivial in comparison. But of course the language bindings for those
languages are written in C/C++, which is ok for me as I know those
languages.

[1] 
https://secure-web.cisco.com/1hl2S1kpirFFJW9IvenEuaa4EAGxduLA8veYSk-oplRc6Kst7sAdKMuWYMRxwh9TxWDln5kMQtW4nFoVsM6fNGpYmpBnRSL6ok280lKYp25zEIK4njlXHFylhgoLjzzJD9dGWh2Bmk0bTKbkne1Ycwn3JnZY7ugfrWBToNL2__OfEaFxvtYiP9c29Lpg_sb-BwxmDSmQEUnyn5vldeqVaeuaT3k2GX-M8WtSK7TJ8rAlDvXLD8FLIgnjdh_egoly8LgYVNjgLfraPfIFxepNbD6ZVziom8nUgvP2GNxJNfpQNp0PombTDtVzJnVtLsYeeRCCqQdkXiepdzXKAvrjaVdVE1lX2oA3YgQjfGxxdOEtDIQsG-wGayObGxLUDx8X0xGI53_kCoAYXlQppYqpVhg/https%3A%2F%2Fgithub.com%2Fdaveyc%2FRTK

David Crayford wrote on 05/11/2018 02:30 PM:
I'm at a loss as to why anybody would use OOREXX on platforms where
there are a multitude of better languages to chose from. If it's
because of familiarity coming from z/OS or z/VM then I would
advise them to take the time to learn something new. Most modern
scripting languages can be picked up in less then a day.
And the code produced is usually crap for the first 5,000 or 10,000
lines of code written in a new language. I had rather know a few
languages well than many languages 'so-so'. Bringing your existing
skills into play is always a good thing. Bringing your poor skills
into play for a production code is just stupid. (I am not against
using your poorer skills for one-off, one-time use code. That is the
best place to learn new skills.)

But with modern languages you have to write less code. There are
libraries to do just about everything you can imagine. I was reading
about the new web services for REXX to create JSON. It really did hammer
home
just how difficult it is to do things in REXX that is one line of code
in modern languages. And to install libraries in modern languages you
use an installer like pip, gem, npm, luarocks which takes care of
dependencies etc.
It's a cliche but if the only tool you have is a hammer the whole world
looks like a nail.

After all the cut-n-paste, I noticed that the biggest complainer is
David. That's ok. You hate Rexx, I hate 'C', and Perl and PHP and ....

I hate Perl and PHP too. I'm not a fan of Ruby either. I don't much like
C but it's a useful language to know.
I have been accused before on this list of pathologically hating REXX.
That's not true, I appreciate it for what it's good at. But I have found
over the years that I prefer other languages. I'm a software developer
and write
code for a living so having the best tools available is important to me.

Tony Thigpen

----------------------------------------------------------------------
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

----------------------------------------------------------------------
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

Reply via email to