7 Reasons that Rexx Still Matters
Test and Monitor | Posted December 01, 2011

You might think of the dynamic language Rexx with nostalgia, but without a sense of urgency to program in it. René Vincent Jansen offers several convincing reasons that it ought to be in your programming toolbox.

Every time I mention Rexx on Slashdot or another techie site, people roll their eyes. They think that Rexx — the first widely used scripting language — is no longer relevant. I disagree, and in this article I explain why.

First: If you haven’t encountered Rexx before, you may need an update. Though Mike Cowlishaw invented it at IBM in 1979, there are nine free and open source Rexx implementations. It’s supported on virtually any operating system, though it got the most attention, initially, on IBM platforms including mainframes and IBM OS/2.

Among the main elements that make Rexx such a pleasure to program in:

  • It is a small language that can do everything.
  • It is case insensitive where that matters.
  • It has built-in TRACE and PARSE statements that are unsurpassed.

So how can Rexx be useful today, when so many other languages – such as Python, PHP, and Perl – are better known and more popular? Let me explain.

1. Rexx is a major glue language that ties together all important mainframe processing.

There is no denying that Rexx, the venerable granddaddy of scripting languages, had its popularity peak around 1995. Mentions of Rexx on Slashdot draw reactions from people who used it and liked it but for some reason feel compelled to announce that they are past Rexx now. This means, more often than not, that they lost the access to the mainframe platform they once used it on, went through a withdrawal period, and found replacement languages. It also means that the new love could not entirely replace the memories.

Rexx was originally, and still is, a mainframe language. It originated around 1980 on VM, and was published by IBM, at first reluctantly, as a result of a groundswell of popular demand by the technical staff of major accounts. It replaced a language called exec-2, which consisted mainly of ampersands. Rexx’s author, Mike Cowlishaw, was initially in trouble, but was later recognized as an IBM fellow. Rexx later spread to all IBM's operating systems such as MVS, OS/2, and OS/400.

Typically, Rexx, as a glue language, is used by staff who are not supposed to do any programming, such as systems programmers and infrastructure and middleware management groups. (Perhaps that makes Rexx the first DevOps language, too.) As such, Rexx applications tend to stay under the radar, but if we were to take them away, it would surely mean the end of the world, with a greater measure of certainty than Camping or the Mayas can offer us. I have seen, recently, how major parts of commercial applications are sidestepped and swapped for Rexx glue, because It Just Works (which should be a Rexx trademark – with apologies to whoever owns the phrase now). So Rexx is the largest unknown application language. Bruce Eckel mentioned this in his Thinking in Java.

For mainframes, a commercial Rexx compiler produces native object code. It also enables promotion of applications to production status without having it executing from source code (and to squeeze out that last drop of performance). It is no great secret that the excellent Rexx compiler, produced from Haifa research by the Vienna labs, is a profitable product. On the mainframe (that important environment for your financial well-being), there is really no alternative.

2. Rexx has evolved into a major object-oriented language with an OO-version for the Java Virtual Machine.

In its original form, the Classic variant that still runs the mainframe, Rexx dated from the era of functional decomposition. If that’s all you know about, you may be surprised to learn that Rexx is also a far more modern programming environment.

There are two object-oriented follow-ons. One is a design by committee which is SmallTalk inspired, and had a stack-based VM before Java, that has all the dynamism that would make Ruby’s mouth water. (But that is an anachronism, since Ruby's gestation was still far in the future when Object Rexx was designed by Simon Nash and his colleagues at IBM Hursley.) Next in innovative and dynamic Object Orientation, ooRexx has perfect backward compatibility with Classic Rexx as its greatest asset. This implementation was born on OS/2, and in the public eye its reputation has undeservedly has suffered by that OS’s untimely demise. It interfaced perfectly to SOM, the equally lamented better component model.

The other update to Rexx is a one-man product by the father of Rexx himself. Started as an experiment to determine if running Rexx on the Java Virtual Machine (JVM) was possible, it became the first alternative language for the JVM. That version is now a mature product, bootstrapped in itself, which the performance runs rings around other alternative VM languages.

The reason for this is simple: NetRexx is implemented as a (platform independent) translator from Rexx to Java source code. This JVM version has, in its 16 years of existence, leveraged the impressive progress in the javac compiler and the hotspot and j9 VMs – and all others. NetRexx is a fresh start, corrects some elements which Mike Cowlishaw was unhappy with (all comparisons are now case insensitive and the overloaded 'do' statement is split into 'do' and 'loop' – retconned into Object Rexx now also). It is, as was established on Sun's JVM Language Summit in 2008, the only alternative JVM language that has stood at the base of an implementation of a class in the Java Class Library itself: BigDecimal.

3. Rexx is still human-oriented.

A very important language design goal has always been that the interpreters and compilers should be easy on the user. In other words, the language should not be complicated because the compiler writer would then have an easier task. This has translated into a “I think this should work” probability that is high and an astonishment factor that is low.

In every flavor of Rexx, all arithmetic is decimal based. It does not suffer “computer” rounding errors that make you look dumb. Furthermore, the decimal precision is unlimited – within reason, memory, and processing cycles of course.

4. While Rexx evolves, it never breaks your old code.

It never ceased to amaze me how many companies went bust because the step between VB n and VB n+1 was too much of an investment, or to hear people speak of “legacy Java code” in 1997. This just will not happen in Rexx. No new reserved words were introduced that trip up the variable names that you chose years ago. NetRexx, for example, does not have any reserved words at all (although I can advise against calling your variable ”end” if you want to shorten your programs by using loops).

5. Rexx has an ISO-standard, and implementations for every platform imaginable.

Few programming languages can boast an ISO standard. It means there is an important yardstick against which to measure implementations, and that shows in the quality of the interpreters and compilers available. Regina, for example, one of the first open source implementations, runs on an impressive array of machines, and on operating systems even I have never heard of.

6. Rexx is open source.

I have seen the future, and it is open source.

Oddly enough, and I am showing my age here, when I started in this profession, software, even IBM's crown jewels, was open source, at least for customers, who would get the source on tape or microfiche without asking. Personally, I remember this as a time that technical staff, even of competing companies, helped each other in a way that was beneficial to all, not to mention fun.

For this day and age, the fact that IBM has made good on its promises to open source Object Rexx and NetRexx (the former in 2005, the latter only recently, in June 2011) means for all Rexx users, fans, and aficionados that its future is secured, and investment is safe. This means in its turn, that its future is starting now. To get involved in open source Rexx, have a look at Open Object Rexx and NetRexx. Regina is an ISO-compliant Classic Rexx for all relevant platforms.

7. The future of Rexx is on mobile platforms.

Rexx is beautifully suited to mobile devices, due to its small footprint and its extreme portability. Several implementations already are on Android for Rexx and NetRexx. For example, there’s a NetRexx IDE on Android devices.

The performance that is inherent to tight code conceived on smaller machines means this bright future is on mobile, the mainframe in your pocket. Chances are, you are running NetRexx code already on your Android device without really knowing it, just like on the mainframes that are enabling modern-day life.

There is a Rexx in your future, whether you like it or not.

For transparency: SQC editorial director Esther Schindler is the co-author of a book on REXX, Down to Earth Rexx (in its first edition), and still has a fondness for the language. She cannot say No to any request to mention it.

See also: