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

15 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 Conan+The+Accountant · · Score: 2, Interesting

      REXX is still used as a scripting language in the administration of some DB2 databases.

    3. 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.
    4. Re:some issues.... by vegaspctech · · Score: 2, Interesting

      I can't name a single other programmer I've known who writes/has written REXX applications.

      REXX was my Swiss Army knife for the last two BBSes I ran. I used it to fetch FidoNet mail for our network, test and process files from FidoNet file echos, pull and convert newsgroup content, mirror ftp sites, let users of my public BBS chat with users of my private BBS, handle fax transmissions coming in on the BBS lines and to do most anything Maximus or RemoteAccess didn't do out-of-the-box or didn't do the way I'd liked. But I haven't done anything with it since I took my last BBS down in '97...

      --

      Making the world a better place, one psychotic episode at a time.

    5. Re:some issues.... by hob42 · · Score: 2, Interesting

      Would you like to hear about my Polish friend who sells shoe polish?

      Case isn't the real issue here, sometimes human languages are just broken like that. Look at the present and past tense of "read" - both spelled the same, but pronounced different when spoken. Polish for shoes can be capitalized too, depending on how it's used.

      Just as I don't expect a compiler do differentiate between "read" and "read" I don't expect it to differentiate between "Polish" and "polish" either.

  2. Want a success story ? by Anonymous Coward · · Score: 1, Interesting

    IBM is still using REXX widely on z/OS.

  3. Ruby Doobie Doooo by OSXexpert · · Score: 2, Interesting

    Check out Ruby, the language. It runs circles around Rexx, is free and very cool. True objects, all the time. Garbage collection built in, as well as everything is an object. The best of Smalltalk, Lisp, BASIC, C, and more.

    --
    --- Old Time NeXThead
  4. 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
  5. Rexx made programming IBM mainframes FUN by IEBEYEBALL · · Score: 2, Interesting

    What I remember about REXX is that it was one of the few languages (along with Model 204 User Language) that made programming IBM mainframes FUN. Of course, nowadays IBM mainframes can be tweaked to run Linux and that opens up a whole slew of scripted languages to choose from.

    --
    -- SKYKING, SKYKING, DO NOT ANSWER.
  6. Re:The KEDIT editor by Anonymous Coward · · Score: 2, Interesting

    - if I click on column 50 after the end of a 30-character-long line, the cursor sticks there and I can start typing - I don't have to type spaces or tabs to get to column 50

    That is truly a great feature for blind users. Imagine not being able to see where the cursor is then having your editor suddenly decide to move it to somewhere else when you start typing. I can't believe editors think that tossing characters into the wrong place is acceptable in 2005. I can understand serious problems like that in 1985 when I first started using computers, but the fact that most editors are broken like that 20 years later is absurd.

    PS: Why am I no longer allowed to post to Slashdot without help from someone that can see? Why the filter to prevent blind users from posting? Why does the person that runs this site hate the blind?

  7. 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()?
  8. 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

  9. 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)

  10. REXX is Easy to Learn by cybercreek · · Score: 2, Interesting

    I've worked in the computer programming trade since 1965 when I learned COBOL '65 in the Air Force. This year, in semi-retirement, in an equally demanding role, I taught three classes of Java Programming in a local high school. I enjoy Java but I must admit a love for REXX.

    I presented a paper on REXX at a REXX conference at Stanford University, May 1990. The topic of the paper was on the ease of portability between platforms. Subsequently to that, I working as a programmer at Bank of America's campus in Concord, CA, I trained all programmers there who wanted to stay late in how to program in REXX on MVS, VM, OS/2, DOS, and Windows platforms, the main differences being how I/O was handled.

    The course I taught at BofA was about three hours long, an hour and 1/2 for two late afternoon sessions. So the learning curve was quite low.

    In addition to teaching everything they needed to know, I also showed them how to code dynamic SQL statements in REXX code. I had already used REXX in a good bit of the code used for utilities and one-time jobs for the Cash Vault System that I was working on there.

    There are few languages that one can learn completely in 3 hours. The Java classes (one AP and two general) took an entire high school year and I only scratched the surface even though I covered all 19 chapters of Cay Horstmann's "Java Essentials".

    Those that turn their noses up at REXX I have found to be the same sort of people who think writing code is an IQ test and if they don't write code that no one else can maintain that they have somehow failed. I don't think programming has to be difficult and the best languages are those that are easy to learn and easy to program in while being able to get the job done and run efficiently. For quick and dirty code or seldom run utilities in production, REXX is an ideal language to use. Of course, for a program that is processing 10+ million records sequentially or updating a DB2 database for millions of transactions for real time access you want to use a compilable language.