Slashdot Mirror


O'Reilly on the Virtues of Rexx

gaijincory writes "O'Reilly's ONLamp has written an interesting article on the history and virtues of Rexx, the first widely used scripting language concocted 25 years ago. According to the review, 'Rexx employs decimal rather than binary arithmetic' and 'You don't need to declare or predefine your variables. Rexx automatically allocates them when you first refer to them.' I'd be interested to hear about any success (or failure) implementation stories."

7 of 330 comments (clear)

  1. some issues.... by yagu · · Score: 4, Interesting

    Okay, I'm probably dating myself here (illegal in Nebraska, btw), but I remember REXX when it emerged as a replacement for EXEC which I had coded extensively in (written entire app systems) on IBM mainframes. There were a lot of benefits to REXX back then, notably it cleaned up and made transparent a lot of garbage and system management chores required to write clean EXEC code (e.g., strings tokenized at 8 chars, awkward variable interpolation)... I used REXX for a while on the mainframe and can't remember why I abandoned it.

    Fast forward 2 or 3 hundred years, and I found myself dropped into a Unix universe, and quickly self taught myself the ins and outs of shell. Haven't looked back since. Now, I'm looking back and am intrigued... REXX really does have some interesting features. And, since I have a little free time on my hands, maybe I'll re-visit REXX, but from userland out there, any feedback would be useful:

    • Are there any performance issues with REXX, especially for large implementations?
    • How much can you do self-contained in REXX today? One of the things I like about a language like perl is it really abstracts a lot of utilities otherwise passed outside of perl's purview, shielding coders from having to write platform specific snippets for portability. From the examples it looks like REXX takes the other philosophy and encourages dropping out momentarily to execute a native system command or utility.
    • Like perl, are there ways to be strict with REXX (it wasn't totally apparent from the article)?
    • Is REXX really that popular out there? The article seems to think REXX is one of the most popular languages, but other than me I can't name a single other programmer I've known who writes/has written REXX applications. Maybe this is only a European seed for now (in the article).
    • Is anyone else uncomfortable with case insensitive languages? That was one of the things I'd hoped REXX would address when it came out as a replacement for EXEC, I've always thought aside from the confusion factor of ignoring case (ever lose a file in Windows because of this?), not distinguishing case throws away an entire semantic of elegance for creating better and more maintainable code.
    1. Re:some issues.... by Foz · · Score: 3, Interesting
      I can't name a single other programmer I've known who writes/has written REXX applications.


      *raises hand* I used to use REXX extensively when I worked at Toyota. I used it on the OS/2 machines as well as the mainframe. I even used Visual REXX occasionally.

      I loved REXX. Gave it up when I moved to perl though. It is a very nice scripting language with a rich feature set.

      -- Gary F.
    2. Re:some issues.... by RetroGeek · · Score: 3, Interesting

      I also used REXX a lot, along with Visual REXX.

      REXX has a wonderful String parsing capability.

      And as for OS/2, as Rexx was the official scripting language, many applications came with REXX aware libraries. You could script directly for the application.

      For instance you could write a script for an email program to manage incoming mail. Or for a FAX program, etc.

      Yes other programs in the Windows (and Linux) world have macro languages, but each syntax is different. With OS/2 and REXX you only needed to learn ONE syntax, then use the libraries.

      It was a great idea.

      --

      - - - - - - - - - - -
      I am a programmer. I am paid to produce syntax not grammar. Deal with it.
  2. Re:Biggest problem is no one is using it by Detritus · · Score: 3, Interesting
    So thats great and all, but why are you programming in a professional capacity in a language that no one can maintain?

    What, like Perl?

    I've written scripts in REXX, and found it easy to write and easy to read at a later date. There are books available on the language. I'd recommend "The REXX Language" by Cowlishaw.

    --
    Mea navis aericumbens anguillis abundat
  3. Re:Is this good? by multipartmixed · · Score: 3, Interesting

    There is no requirement to work out types in order to declare variables.

    Dynamically declared are a terrible, terrible, terrible thing.

    Take the following JavaScript excerpt:


    function foo()
    {
    for (i=0; i < 10; i++)
    hello();
    }

    function bar(world)
    {
    for (i=0; i < 10; i++)
    foo();
    }

    bar(i);


    How many times does hello() run? It looks like it should run 100 times. But it only runs 10 times.

    Add "var i" to each of those functions, and it behaves as expected.

    Javascript in many respects is a good (core) language. With better inheritance and a few other tweaks, it could be an excellent scripting language. But dynamically allocated variables really, really hurts it.

    --

    Do daemons dream of electric sleep()?
  4. Re:Success/failure stories? by jwdb · · Score: 3, Interesting

    Are these supposed to be positive points? Because it kind of flies in the face of coding best practices...

    I take it you've never heard of LISP? It's a dynamically typed language that, despite being a few decades old (4 or 5 I think) is still seeing some decent usage. I believe the backend of Yahoo Stores is written in LISP, for example.

    Defining your vars beforehand is good practice for strict, structural coding projects and languages. If you're working in a flexible language and you know what you're doing, it's rather unnecessary (not that I can claim to, but I'm learnin').

    Jw

  5. ARexx, too bad Rexx didn't grab its featurelist. by Almost-Retired · · Score: 3, Interesting

    Raises hand here, if only to lament that Rexx, at least in the form of the linux regina clone, is a poor, no, poor to the point of starving to death, comparison to ARexx, written BY William Hawes for the amiga.

    It was extensible by writing libraries for it, libraries that allowed it to do anything you were of a mind to.

    When I was still running a big box amiga, Jim Hines and I (we were both working at a tv station, http://www.wdtv.com/> ) and needed a cron to run some of the very time consuming rendering jobs that lots of video people were running on amiga's a decade back.

    So we wrote a cron in ARexx, and by carefull coding, its cpu hit was less than we could measure. Most of the wannabe cron apps for the amiga were coded to wait in busy loops till the clock matched, and of course used 20% or more of the cpu.

    Eventually I bought a copy of rexx-plus, the only actual compiler for arexx there ever was, which could build standalone programs out of your arexx scripts.

    You can yet, I think, download that to run on your old amiga, from Aminet.net, search for EzCron, latest version. IIRC the archive contains both the arexx script itself, and the compiled binary.

    We did things in a couple of days using arexx that would have taken weeks in C. Repeatedly.

    There is yet today, a headless old 2000/040 amiga there, running EzCron, and its executing additional arexx scripts to grab the prompter files for our newscasts from the news server in the news dept., and make them available for you to read at the above site. Incomplete sometimes because the news folks get lazy and don't transcribe to the prompter, whats said in a taped segment.

    But when we looked at making those arexx scripts run on linux, regina upchucked all over the place because they were doing things that Rexx never had in its repertory. If that miggy ever dies for good, we'll have to rewrite them in bash, and that will take a couple of weeks to translate I expect. Bash I believe does have all the tools to do it. But its going to take a concerted effort we haven't found the time to do yet. Normal life keeps happening...

    --
    Cheers, Gene
    "There are four boxes to be used in defense of liberty:
    soap, ballot, jury, and ammo. Please use in that order."
    -Ed Howdershelt (Author)