Object REXX is a high-level, general-purpose, interpreted, object-oriented (class-based) programming language. Today it is generally referred to as ooRexx (short for Open Object Rexx), which is the maintained and direct open-source software successor to Object REXX.

It is a follow-on and a significant extension of the Rexx programming language (called here classic Rexx), retaining all the features and syntax while adding full object-oriented programming (OOP) abilities and other new enhancements. Following its classic Rexx influence, ooRexx is designed to be easy to learn, use, and maintain. It is essentially compliant with the "Information Technology – Programming Language REXX" American National Standards Institute (ANSI) X3.274-1996 standard and therefore ensures cross-platform interoperability with other compliant Rexx implementations. Therefore, classic Rexx programs typically run under ooRexx without any changes.

There is also Rexx Object Oriented (roo!), which was originally developed by Kilowatt Software and is an unmaintained object-oriented implementation of classic Rexx. The motivation behind the project was to transfer the advantages of OOP to classic Rexx while remaining compatible and thus transferring the usability of classic Rexx to OOP. Early on, the projects focused on OOP aspect such as treating everything as an object, object-based encapsulation and message passing, object-based concurrency, classes and inheritance.

alt=IBM Object REXX Logo|thumb|Object REXX (until 2004)|150x150px

This initial work later led under the direction of Rick McGuire to the first prototype of Object REXX, which was presented in 1992. In 1994, IBM announced that Object REXX would replace classic Rexx as the standard REXX interpreter in the next version of OS/2. In 1997, versions for Windows 95, Windows NT and Linux followed. In 1999 an Object REXX version for AIX V4.1.5 or higher was released. In 2000, versions for zLinux and Sun/Solaris followed. For Windows 2000, Windows Me, Windows 98 and Windows NT 4.0, the last major update for Object REXX was released in 2001.

alt=ooRexx logo|thumb|ooRexx (since 2005)

On 12 October 2004, IBM announced the discontinuation of Object REXX and transferred the source code and licensing rights to the non-profit Special Interest Group (SIG), the Rexx Language Association (RexxLA). The code that IBM released to open source did not include the classes for IBM System Object Model (SOM), which is known as the object framework for OS/2's Workplace Shell (WPS). Although IBM discontinued the development of SOM in 1997, it is still a fundamental framework for OS/2. The OS/2 version of Object REXX includes classes to support SOM and WPS. These are included in OS/2's initial follow-on product, eComStation, and also in its current descendant, ArcaOS, for which IBM's original Object REXX interpreter continues to be available.

In 2005, the RexxLA released ooRexx as a new incarnation of Object REXX as free and open-source software under the Common Public License. This first version of ooRexx 3.0.0 has been heavily refactored compared to the original IBM source code in order to increase readability. Later, the ooRexx kernel was rewritten in pure C++, and a new architecture and native interface were designed and implemented under the technical direction of Rick McGuire. This work enabled the RexxLA to release ooRexx 4.0.0 with support for 64-bit in 2009. To this day, the RexxLA continues to develop, support and maintain ooRexx as well as classic Rexx and NetRexx. Furthermore, the RexxLA organizes international annual symposia.

Releases

The following table contains noteworthy features and changes of major Object REXX and ooRexx interpreter versions. All ooRexx releases and the necessary documentation are available freely on SourceForge. For Arch Linux based distributions the current and the development version are available as Arch User Repository. Since version 5.0.0 there are portable versions of the interpreter that can be used without installation, and an unofficial port to OS/2 also exists. The "net-oo-rexx" bundle contains the latest portable version of ooRexx, Netrexx, a Netrexx shell, the Java bridge and associated packages, a shell for ooRexx and various other packages and programs.

For Intellij IDEA, the ooRexxPlugin adds support for syntax highlighting, syntax checking, code completion and documentation support modeled after Javadoc using annotations. As of September 2012 there is support for syntax highlighting of ooRexx 4.0 features in Vim. RexxCPS is a benchmark that measures the number of Rexx clauses (independent syntax units in a line) per second that an interpreter processes.

{| class="wikitable sortable"

|-

! Major Releases !! Release date !! Notable Features and Changes

|-

|

| 2005-03-30 ||

  • First release as open-source
  • Supports 28 keyword instructions, four directives, 29 classes with associated methods and 75 built-in functions
  • Includes an extension class for regular expressions and ooDialog 3.0.0
  • Improved PDF documentation

|-

|

| 2009-09-30 ||

  • Support for 64bit versions of Linux, AIX and Windows
  • Drop support for WSH engine
  • Improved C++ application programming interface
  • Addition of <code>Buffer</code>, <code>IdentityTable</code>, <code>Orderable</code>, <code>Package</code>, <code>Pointer</code>, <code>RexxContext</code>, <code>Routine</code>, <code>WeakReference</code> and <code>SocketClass</code> classes
  • New methods for <code>RexxQueue</code>, <code>Object</code>, <code>DateTime</code>, <code>Method</code>, <code>Stem</code>, <code>String</code>, <code>MutableBuffer</code>, <code>OLEObject</code> classes
  • Additional classes and methods for ooDialog
  • Addition of sample programs and separate documentation for the Windows extension library

|-

|

| 2011-09-28 ||

  • Addition of RxUnixSys library and ooSQLite extension
  • Enhancement of TCP/IP socket and ooDialog support
  • Addition of <code>File</code> class and new methods for <code>DateTime</code> class
  • Addition of extension classes for handling the comma-separated values, multipurpose internet mail extensions and simple mail transfer protocol
  • Separate documentation for the Rexx and Unix extension library (RxUnixSys)

|-

|

| 2014-02-23 ||

  • More than 43 enhancements (e.g. tracing)
  • Standalone installer for ooDialog 4.2.3 and several new classes and methods
  • Systemd support and compliance with Linux Standard Base
  • New methods for the <code>Relation</code>, <code>OrderedCollections</code>, <code>Array</code>, <code>String</code>, <code>Mutablebuffer</code>, <code>StackFrame</code>, <code>Queue</code> and <code>OrderedCollection</code> classes
  • Separate documentation for ooSQLite external library

|-

|

| 2022-12-22 ||

  • A total of 86 new features and 76 enhancements
  • Addition of <code>AlarmNotification</code>, <code>Json</code>, <code>MessageNotification</code>, <code>RexxInfo</code>, <code>StringTable</code> and <code>Validate</code> classes
  • New methods for <code>Alarm</code>, <code>Class</code>, <code>Collection</code>, <code>Directory</code>, <code>Message</code>, <code>Method</code>, <code>MutableBuffer</code>, <code>Object</code>, <code>Package</code>, <code>Routine</code>, <code>String</code> and <code>RxFtp</code> classes
  • Separate documentation ooRexxUnit (unit testing framework), orxnCurses (ncurses library), C/C++ APIs and the release and build environment

|-

|

| 2025-05-02 ||

  • A total of 36 enhancements
  • Several improvements to <code>Json</code> class
  • Inclusion of <code>oleinfo</code> scripts to facilitate Windows automation
  • Addition of the <code>TraceObject</code> class to support the tracing of multi-threaded programs|sortKey=5.2

| 2026-04-18 ||

  • A total of 23 enhancements
  • Improvements to <code>File</code>, <code>Json</code> and <code>TraceObject</code> classes
  • Addition of <code>Yaml</code> class for YAML support
  • Two additional sub-options for the <code>::option</code> directive
  • Addition of <code>gc()</code> built-in-function for invoking the garbage collector for debugging
  • Addition of <code>utf8proc</code> unicode library

|-

|

| 2026-04-25 ||

|}

Design philosophy

ooRexx follows the design philosophy of classic Rexx to create a "human-centered" programming language that is easy to learn, code, remember and maintain. This is achieved, in part, by keeping the language small and following the principle of least astonishment. A readable syntax is enabled by being case-insensitive, free-form, requiring as little punctuation as possible, and using instructions that are straightforward English.

Instructions

As in classic Rexx, there are assignment instructions, keyword instructions and command instructions. In line with the desire to keep the language small, ooRexx has only thirty keyword instructions.

<syntaxhighlight lang="oorexx" style="background-color: #ffffff; !important" line="1">say "Hello World!" /* output: Hello World! */

say " This" 'is' - /* trailing dash for continuation */

"REXX" || "!" /* output: This is REXX! */</syntaxhighlight>

Case-insensitive

As classic Rexx, ooRexx is a case-insensitive programming language. Accordingly, the ooRexx interpreter capitalizes all characters outside quotation marks (single or double) and ignores case for instructions, variable names and all other aspects of the language. Only sequences within quotation marks are treated as literal strings and are not changed during processing. A string object can be of any length and contain any characters, including numerical values. It is therefore possible to change numerical values with string manipulations and methods of the <code>String</code> class. In addition, a string variable can contain any type of expression, including executable instructions, which can be evaluated or executed with the <code>INTERPRET</code> keyword instruction. In contrast to Smalltalk, there is an explicit message operator, the tilde (<code>~</code>), where the receiving object is placed to the left of it and the result of the operation is returned. Sending a message leads to the activation of a method with the corresponding method name and to the manipulation of the receiving object. Like Smalltallk, ooRexx messages can be cascaded if two tildes (<code>~~</code>) are used instead of one, returning the object that received the method rather than the result produced.

The default behavior of most methods can be changed by specifying an option, which can be either spelled out or abbreviated and is not case-sensitive. When reading code, this enables a literal understanding and reduces the learning effort for beginners, as there is no need to learn the meaning of abbreviations.

Customization

ooRexx offers various customization mechanisms, such as extending built-in functions and classes, using unspecified methods, adding command environments and invocation switches or creating own builds.

The default behavior of built-in functions can be changed by adding a label with the same name as the function to be overridden (e.g. <code>date</code>) at the end of the program scope or by adding a <code>::routine</code> directive. The code can either calculate results itself or modify the results of the original built-in function.<syntaxhighlight lang="oorexx" style="background-color: #ffffff; !important" line="1">

say Date() /* output, e.g.: 16 JUN 2025 */

exit

Date: return newDate() /* label pointing to "newDate" routine */

::Routine newDate

newDate = date()~upper /* use of date() BIF, but with capital letters */

return newDate

</syntaxhighlight>Since ooRexx 5.0.0 namespaces have been added that allow the subclassing of built-in classes. When interactive debugging, the interpreter pauses after most instructions that are traced.<syntaxhighlight lang="oorexx" style="background-color: #ffffff; !important" line="1">

trace off /* do not trace prolog */

.TraceObject~option = "Full" /* set option to "Full" */

.TraceObject~collector = .array~new

o = .Test~new /* create an instance */

say "starting worker asynchronously ..."

o~start("do") /* dispatched on a new thread */

say "about to wait for worker to end ..."

o~wait /* synchronize with worker */

say "waiting is over"

::class Test

::method init /* constructor */

expose lock /* access attribute */

lock = .true /* set default */

::method wait unguarded

expose lock /* access attribute */

guard on when lock = .false

::method do /* do some work */

expose lock /* access attribute */

t = random(1,999)/1000

say "do: working for" t "secs"

call sysSleep t

say "do: ending work"

lock = .false /* release lock */

::options trace results

</syntaxhighlight>

The ooRexx debugger, which is also included in the "net-oo-rexx" bundle, is based on Trace and offers a graphical user interface (GUI) that uses the Java bridge to facilitate debugging on all platforms.

Built-in functions and classes

As ooRexx aims to be compatible with classic Rexx, the traditional built-in functions are still available. The RxSock native library enables to incorporate TCP/IP protocols, while the RxFtp native library specifically provides access to the file transfer protocol (FTP). The RxMath native library offers advanced mathematical functions such as square root calculation, exponential function, logarithm, sine, cosine, tangent, arc sine and power calculation. <syntaxhighlight lang="oorexx" style="background-color: #ffffff; !important" line="1">

Say rxcalcsin(1) /* output: 0.0174524064 */

::requires 'rxmath' LIBRARY /* load a native library */

</syntaxhighlight>

For Windows, ooRexx includes the ooDialog framework allowing to produce Windows dialogs and therefore graphical user interfaces. The interpreter is delivered with several example programs and function packages that demonstrate the use of this framework. The RxUnixSys library provides functions on most Unix systems for interacting with processes and threads, users and user groups, files and file systems and other. Many of these external packages and libraries are also compatible with other Rexx implementations.

Not supplied with interpreter

There are also packages that need to be downloaded and added manually. As part of the Net-oo-rexx bundle, the Regex package enables handling regular expressions, while Log4rexx provides a logging framework and Oorexxshell an interactive ooRexx shell.

The Rexx Parser package provides an abstract syntax tree parser for Rexx and ooRexx, which assigns a category to all script elements, while the Rexx Highlighter package expands the parser and enables highlighting to be output as HTML, ANSI colors, LuaTex and LaTeX. The Rexx XML parser enables the parsing of XML files into an in-memory model and access to this model via a DOM-like API. There is also an XML DOM parser without a validation function, which includes a DOM builder and DOM access methods.

The Mod_Rexx package provides a module for Apache 2.4 that gives an interface to ooRexx under Windows, AIX and Linux and enables all phases of an Apache request to be processed. Although RexxGTK does not cover the entire GTK toolkit, it wraps the GTK library in a set of ooRexx classes and functions to provide platform-independent GUI functionality. A provisional package with tested support for Linux is available for newer versions of GTK. There is also an external library that implements a bidirectional Java bridge, which enables interaction between ooRexx and Java.

C/C++ APIs

As classic Rexx, ooRexx includes APIs for extending Rexx with applications written in C and vice versa. This enables the creation of handlers for subcommands used in Rexx programs that run as application macros, external functions that allow a direct extension of the ooRexx function set and system functions that allow the behavior of the interpreter to be customized. The bridge is realized by requiring the ooRexx package <code>BSF.CLS</code>, which defines public routines, classes and the environment symbol <code>.BSF4REXX</code>. The <code>CLR.CLS</code> package together with Jini4Net enables the use of the .NET framework. Communication with processes via the D-Bus middleware under Linux is possible using the <code>DBUS.CLS</code> package. The <code>JDOR.CLS</code> package provides a command handler that leverages the Java2D classes (based on AWT) for graphics rendering. Based on the JDOR command handler, the experimental <code>JDORFX.CLS</code> package enables the rendering of 3D graphics using JavaFX 3D classes.

SQL

The ooSQLite class provides an interface to SQLite, an in-process library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine. It allows interaction with several variants of SQL databases without having to change the script, but multi-threading is not supported.

The external Rexx/SQL package enables access to SQL databases of different vendors via Open Database Connectivity (ODBC). With the goal of providing more functionality than a subset of ODBC and being thread-safe, the Rexx MySQL library provides a wrapper in C to add MySQL support.

Windows automation

The Windows extension includes the Windows Script Host (WSH) Scripting Engine that can be used to perform general automation tasks. It also includes Object Linking and Embedding/ActiveX (OLE) support allowing to interact with Windows programs via the <code>OLEObject</code>. OLE Automation is an inter-process communication mechanism developed by Microsoft that is based on a subset of the Component Object Model (COM). This mechanism enables, among other things, the invocation of program functions, the querying and setting of attributes and the interception of component events. The ooRexx interpreter comes with examples that demonstrate OLE interaction with Access, Word, Excel, OpenOffice/LibreOffice, ActiveDirectory, WMI and other programs. Furthermore, a utility program for searching available OLE objects is included.