Object REXX | |
Paradigm: | Multi-paradigm object-oriented (class-based), procedural (imperative), structured |
Latest Release Version: | 5.0.0 |
Latest Preview Version: | 5.1.0 |
License: | CPL 1.0, GPLv2 |
Designer: | Simon C. Nash (IBM) |
Implementations: | Object REXX (until 2004) ooRexx (since 2005) |
Influenced By: | Rexx, Smalltalk |
Influenced: | NetRexx |
Programming Language: | C++ |
Platform: | IA-32, x86-64, ARM, s390x |
Operating System: | Cross-platform Linux, Microsoft Windows, macOS, Solaris, OpenIndiana, AIX, FreeBSD, OS/2 |
File Ext: | .rxs, .rex, .rexx, .cls |
Object REXX is a high-level, general-purpose, interpreted, object-oriented (class-based) programming language.
It is a follow-on and a significant extension of the Rexx programming language (often called "Classic Rexx"). Object REXX retains all the features and syntax of "Classic Rexx" while adding full object-oriented programming (OOP) capabilities. Although Object REXX does not implement all aspects of the "Information Technology – Programming Language REXX" ANSI X3.274-1996[1] standard, it offers many new features of its own.
Following its "Classic Rexx" influence, Object REXX is designed to be easy to learn, use, and maintain. Object REXX is today often referred to as Open Object Rexx (ooRexx).
In 1988, the "Oryx" project at IBM, under the technical direction of Simon C. Nash, experimented with merging "Classic Rexx" with the object model of Smalltalk.[2] [3] 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.[4] 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.[5]
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 1996, Object REXX was released as part of the OS/2 Warp 4 operating system.[6] In 1997, versions for Windows 95, Windows NT and Linux followed.[7] [8] In 1999 an Object REXX version for AIX V4.1.5 or higher was released.[9] 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.[10]
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). In 2005, the RexxLA released ooRexx as a new incarnation of Object REXX as free and open-source software under the Common Public License.[11] 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 annual symposia.[12]
IBM's original Object REXX interpreter continues to be available in OS/2-derived operating systems, such as ArcaOS and eComStation.
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 on Sourceforge.[13] [14] For Arch Linux based distributions the current and the development version are available as Arch User Repository. Since release 5.0.0, portable versions of the interpreter are available that allow it to be used without installation.
Major Releases | Release Date | Notable Features and Changes | |
---|---|---|---|
1996-09-25 |
| ||
1997-02-28 (IE) 1997-05-30 (DE) |
| ||
1999-04-09 |
| ||
2001-04-21 |
| ||
2005-03-30 |
| ||
2006-08-21 |
| ||
2006-11-23 | |||
2007-09-17 |
| ||
2008-01-22 |
| ||
2009-09-30 |
| ||
2011-09-28 |
| ||
2014-02-23 |
| ||
2022-12-22 |
| ||
2024 |
ooRexx is designed to retain all the features of "Classic Rexx". Its conforms to the ANSI standard for the Rexx language (X3.274-1996, “Programming Language Rexx”), for interoperability across platforms with other conforming implementations. Thus "Classic Rexx" programs typically run under ooRexx without any changes. This makes it easy to transport both program code and developer knowledge from "Classic Rexx" to ooRexx. To this, ooRexx adds all the features of OOP, such as subclassing, polymorphism, and data encapsulation. Further features include multiple inheritance via mixin classes.
The code that IBM released to open source in 2004 did not include the classes for IBM System Object Model (SOM) and Workplace Shell (WPS) support.[16] The OS/2 version of IBM Object REXX includes classes to support SOM [17] and WPS.[18] These are also included OS/2's initial follow-on product, eComStation, and also in its current descendant, ArcaOS.[19]
ooRexx follows the design philosophy of "Classic Rexx" to create a "human-centered" programming language that is easy to learn, code, remember and maintain, in part by keeping the language small and following the principle of least astonishment.[20] [21] ooRexx 5.0.0, for instance, contains only thirty keyword instructions. In addition, there is only one data type, the character string, which does not have to be declared, which reduces the effort for programmers compared to strictly typed languages.[22]
As "Classic Rexx", ooRexx has a free-form syntax where the positioning of the program code is irrelevant. Before execution, the interpreter merges multiple blanks into one, while a character string enclosed in quotation marks (single or double) is not changed. Two vertical bars (||
) or adjacent quotation marks (""
or <nowiki>''</nowiki>
) can be used as concentration operators. Since a free-form language requires fewer syntactic rules to be considered, it is assumed that it eases the learning effort by reducing the intrinsic cognitive load.[23]
As "Classic Rexx", ooRexx is a case-insensitive programming language. The interpreter capitalizes all characters outside quotation marks before executing them. Because the cases do not need to be differentiated, fewer additional details need to be learned and frustrating syntax errors are avoided.
Similar to the messaging paradigm implemented by Alan Kay in Smalltalk, everything in ooRexx is an object that can be communicated with by sending messages naming a method. The notion of sending messages to objects as if they were living beings helps beginners to learn OOP concepts.[24]
In contrast to Smalltalk, there is an explicit message operator, the tilde (~
), where the receiving object is placed to the left of it and the result of the operation is returned. Like Smalltallk, ooRexx messages can be cascaded if two tildes (~~
) 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. This enables a literal understanding and reduces the learning effort for beginners. For example the strip method by default removes leading and trailing blanks. This behavior can be changed, for example, by specifying "leading"
or "l"
as an option.
ooRexx release 5.0.0 contains 82 built-in functions, the number of which has remained relatively stable over the years.[25] Using the ::requires
directive, external function libraries can be integrated on a per program basis. Such libraries are usually organized around domain-specific functions.
The Rexx extension library provides a class for reading and writing comma-separated values (CSV) files, for creating and processing JavaScript Object Notation (JSON) data and a sub-command environment that partially emulates a TSO/CMS environment.[26] The RxMath library offers advanced mathematical functions such as square root calculation, exponential function, logarithm, sine, cosine, tangent, arc sine and power calculation.[27] The RxSock library enables to incorporate TCP/IP protocols,[28] while the RxFtp library[29] specifically provides access to the file transfer protocol.
The Windows extension includes a 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 such as the Microsoft Office via the OLEObject
.[30] ooSQLite provides an interface to SQLite, an in-process library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.[31] There is also an external library that implements a bidirectional Java bridge, based on the Bean Scripting Framework, called BSF4ooRexx, which allows Java classes to be used in ooRexx programs.
For Windows, ooRexx includes the OODialog framework allowing to produce Windows dialogs and therefore graphical user interfaces.[32] In addition to OLE support allows the Windows extension to interact with the Windows program manager, the system event log, the clipboard and the registry as well as to query, edit and interact with windows, menus or submenus.
For POSIX-compatible operating systems, the nCurses class library enables the writing of text-based user interfaces using the ncurses programming library.[33] 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.[34]