Jump to content

Object REXX

From Wikipedia, the free encyclopedia
(Redirected from OREXX)
Object REXX
ParadigmMulti-paradigm: object-oriented (class-based), procedural (imperative), structured
Designed bySimon C. Nash (IBM)
First appeared1988; 36 years ago (1988)
Stable release
5.0.0 / 10 May 2023; 17 months ago (10 May 2023)
Preview release
5.1.0
Implementation languageC++
PlatformIA-32, x86-64, ARM, s390x
OSCross-platform: Linux, Microsoft Windows, macOS, Solaris, OpenIndiana, AIX, FreeBSD, OS/2
LicenseCPL 1.0, GPLv2
Filename extensions.rxs, .rex, .rexx, .cls
Websitewww.rexxla.org
Major implementations
Object REXX (until 2004)
ooRexx (since 2005)
Influenced by
Rexx, Smalltalk
Influenced
NetRexx

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. Several object-oriented implementations of REXX are available, including Open Object Rexx ("ooRexx") and Rexx Object Oriented ("roo!").[2]: 311 

History

[edit]

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.[3][4] 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.[5] 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.[6]

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.[4] In 1996, Object REXX[a] was released as part of the OS/2 Warp 4 operating system.[7] In 1997, versions for Windows 95, Windows NT and Linux followed.[8][9] In 1999 an Object REXX version for AIX V4.1.5 or higher was released.[10] 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.[11]

On 12 October 2004, IBM announced the discontinuation of Object REXX and transferred the source code and licensing rights[b] 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.[12] 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.[13]

IBM's original Object REXX interpreter continues to be available in OS/2-derived operating systems, such as ArcaOS and eComStation.

Releases

[edit]

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.[14][15] For Arch Linux based distributions the current and the development version are available as Arch User Repository. For ooRexx 5.0.0 an unofficial port to OS/2 is available. Since release 5.0.0, portable versions of the interpreter are available that allow it to be used without installation. For Intellij IDEA, the ooRexxPlugin adds support for syntax highlighting, syntax checking, code completion and documentation support modeled after Javadoc using annotations.[16]

Legend:
Old version
Old version, still maintained
Latest version
Latest preview version
Future release
Major Releases Release Date Notable Features and Changes
Old version, no longer maintained: Object REXX
1.0.0
(OS/2)[17]
1996-09-25
  • First official release as part of OS/2 Warp 4
Old version, no longer maintained: Object REXX
1.0.0
(Windows)[18]
1997-02-28 (IE)
1997-05-30 (DE)
  • First releases for Windows as "Interpreter Edition" (IE) and "Development Edition" (DE)
  • DE additionally provides a dialogue class library, a graphical dialogue editor and a built-in tokeniser
  • Provides structured programming constructs such as select, do loops, if-then-else branching and subroutine calls
  • Provides array handling, arithmetic and other build-in functions
  • Support for OOP concepts such as classes, object, methods, encapsulation, messaging, polymorphism, inheritance and multiple inheritance (metaclasses and mix-in classes)
  • Includes interfaces to DB2, TCP/IP sockets and C/C++ applications
Old version, no longer maintained: Object REXX
1.1.0
(AIX)[19]
1999-04-09
Old version, no longer maintained: Object REXX
2.1.0
(Windows)[20]
2001-04-21
  • Support for Windows 98, Windows Me, Windows 2000, and Windows NT
  • Support for Object Linking and Embedding/ActiveX, Windows Script Host (WSH) engine
  • Support for Unicode functions and addition of mathematical function package
  • Support for subroutine, procedure and function calls
  • Support for stems and compound variables
Old version, no longer maintained: ooRexx
3.0.0[21][22]
2005-03-30
  • First release of ooRexx as the open-source successor to Object REXX
  • Supports 28 keyword instructions, four directives, 29 classes with associated methods and 75 build-in functions
  • ooDialog 3.0.0 for creating graphical user interfaces on Windows systems
  • Includes extension classes for mathematical calculation, dealing with TCP/IP sockets, regular expressions and the file transfer protocol
  • Improved PDF documentation that supports links, meta information and document indexing
Old version, no longer maintained: ooRexx
3.1.0[23]
2006-08-21
  • Various enhancements
  • Separate documentation for ooDialog
Old version, no longer maintained: ooRexx
3.1.1[24]
2006-11-23
  • Support for Linux, Windows, AIX and Solaris
  • Additional functions for the RexxUtil library
  • Additional methods for several classes
  • Addition of CircularQueue class and associated methods
Old version, no longer maintained: ooRexx
3.1.2[25]
2007-09-17
  • Added support for MacOS
  • Additional methods for the MutableBuffer, String and Object classes
  • Provides interface to Open Office
Old version, no longer maintained: ooRexx
3.2.0
2008-01-22
  • Several enhancements
Old version, no longer maintained: ooRexx
4.0.0[26]
2009-09-30
  • Support for 64bit versions of Linux, AIX and Windows
  • Improved C++ application programming interface
  • Restructuring of ooDialog and addition of 7 classes and 24 methods
  • Addition of Buffer, IdentityTable, Orderable, Package, Pointer, RexxContext, Routine, WeakReference and SocketClass classes and associated methods
  • Addition of 17 samples to illustrate ooRexx concepts
  • Separate documentation for Windows extension library
  • Four new methods for the RexxQueue, three for the Object, four for the DateTime and one each for the Method, Stem and String classes
  • The MutableBuffer class now supports most of the String class methods
  • Addition of seven methods to the OLEObject class, responsible for the Object Linking and Embedding/ActiveX interface
  • Drop support for the Windows Script Host (WSH) engine
Old version, no longer maintained: ooRexx
4.1.0[27]
2011-09-28
  • Addition of File class including four new methods and 29 instance methods
  • Addition of extension library for Unix systems (49 functions)
  • Separate documentation for Rexx extensions library and Unix extensions library
  • Addition of extension classes for handling the comma-separated values, multipurpose internet mail extensions and simple mail transfer protocol
  • Addition of ooSQLite extension[28] to create, modify, and query SQL based databases
  • Enhancement of TCP/IP socket support
  • Additional class and method for ooDialog
  • Additional method for DateTime class
Old version, no longer maintained: ooRexx
4.2.0[29]
2014-02-23
  • More than 43 enhancements
  • Standalone installer for ooDialog 4.2.3 and several new classes and methods
  • Separate documentation for ooSQLite external library
  • Systemd support for Linux system and compliance with Linux Standard Base
  • Add trace information about method invocations
  • Additional method each for the String, Mutablebuffer, StackFrame, Queue and OrderedCollection classes
  • Additional methods for the Relation class, several sorting methods for OrderedCollections and methods for inserting and deleting elements for the Array class
Current stable version: ooRexx
5.0.0[30]
2022-12-22
  • A total of 86 new features and 76 enhancements
  • Addition of several new keyword instructions and directives
  • A total of 57 classes and associated methods
  • Addition of AlarmNotification, Json, MessageNotification, RexxInfo, StringTable, StringTable and Validate classes and associated methods
Latest preview version of a future release: ooRexx
5.1.0
2024-09-19

Design philosophy and features

[edit]

ooRexx is designed to retain all the features of "Classic Rexx". Its conforms[c] to the ANSI standard for the Rexx language (X3.274-1996, “Programming Language Rexx”[1]), 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.[31] The OS/2 version of IBM Object REXX includes classes to support SOM [32] and WPS.[33] These are also included OS/2's initial follow-on product, eComStation, and also in its current descendant, ArcaOS.[34]

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.[2][35] ooRexx 5.0.0, for instance, contains only thirty keyword instructions.[36] In addition, it is a dynamic programming language that offers flexibility and allows to focus on development rather than language constraints. 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.[37]

Similar to "Classic Rexx", there are assignment instructions, keyword instructions and command instructions. Unlike many other languages, no keywords are reserved, so there is no need to memorize a long list of reserved words.[38] In cases where the string is neither an assignment nor a keyword instruction, it is considered a command instruction, which causes the interpreter to pass it to the operating system for execution and set a variable RC for the return code. In addition, the ADDRESS instruction allows commands to be redirected to specific environments such as Bourne Shell, Bash, Z-Shell, Command Prompt and others, as well as intercepting errors.

a = "hello world"               /* assignment instruction       */
do i = 1 to 2                   /* keyword instruction "DO"     */
    say "round #" i":" a        /* keyword instruction "SAY"    */
end                             /* keyword instruction "END"    */
"echo Hello World"              /* command to operating system  */
say "RC:" rc                    /* return code                  */

Free-form

[edit]

As "Classic Rexx", ooRexx has a free-form syntax where the positioning of the program code is irrelevant. Before execution, the interpreter merges multiple unquoted blanks into one, while a character string enclosed in quotation marks (single or double) is not changed. Concatenation can be requested explicitly with two vertical bars (||), or implicitly by separating terms with spaces or by abutting terms. 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.[39]

say   "Hello World!"                   /* output: Hello World!      */
say "   This"     'is'     "REXX!"     /* output:    This is REXX!  */
say "Good""bye" || '!'                 /* output: Goodbye!          */

Case-insensitive

[edit]

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.[39]

a = "This is REXX!"
Say A                                 /* output: This is REXX!  */
SAY a                                 /* output: This is REXX!  */

Message paradigm

[edit]

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.[38]

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.[39] 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. While functions are nested in "Classic Rexx", messages can be chained in ooRexx, which improves the readability of a statement.[38]

a = "   I am ooRexx!"
say a                                 /* output:    I am ooRexx! */
say a~Strip("Leading")                /* output: I am ooRexx!    */
say a~strip("l")~reverse              /* output: !xxeRoo ma I    */

The messaging paradigm allows the simultaneous execution of multiple methods on a single object, so that concurrency is possible. Several objects can be active at the same time and exchange messages with each other for communication and synchronization.[36]

Classes and Methods

[edit]

In addition to the three instruction types of "Classic Rexx", ooRexx adds directive instruction that are not executable, with the first directive marking the end of the executable part of the program.[36] To make directive instructions readily recognizable, they are introduced with two consecutive colons, such as ::CLASS classname, which causes the interpreter to define a new class with the name "classname".

d = .dog~new                                            /* create and assign a dog */
d~bark                                                  /* let the dog bark        */
 
::class dog                                             /* class directive         */
::method bark                                           /* method directive        */
    say "wuff!"                                         /* output: wuff!           */

There are four different types of classes: Object classes, which act as a factory for creating objects, mixin classes, which add methods to other classes, abstract classes, which provide definitions for methods, and metaclasses, which can be used to create other classes.[36]

Built-in and external functions

[edit]

ooRexx release 5.0.0 contains 82 built-in functions, the number of which has remained relatively stable over the years.[36] 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.[40] The RxMath library offers advanced mathematical functions such as square root calculation, exponential function, logarithm, sine, cosine, tangent, arc sine and power calculation.[41] The RxSock library enables to incorporate TCP/IP protocols,[42] while the RxFtp library[43] specifically provides access to the file transfer protocol.

Bridges

[edit]

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.[44] ooSQLite provides an interface to SQLite, an in-process library that implements a self-contained, serverless, zero-configuration, transactional SQL database engine.[45] 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.[38]

Operating system specific

[edit]

For Windows, ooRexx includes the OODialog framework allowing to produce Windows dialogs and therefore graphical user interfaces.[46] 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.[44]

For POSIX-compatible operating systems, the nCurses class library enables the writing of text-based user interfaces using the ncurses programming library.[47] 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.[48]

Notes

[edit]
  1. ^ Including interfaces to System Object Model (SOM) and Workplace Shell (WPS)
  2. ^ Excluding the SOM and WPS packages
  3. ^ Object REXX and Open Object Rexx do not include all of the new features of ANSI standard Rexx.

References

[edit]
  1. ^ a b "X3.274-1996 American National Standards Institute for Programming Language Rexx" (PDF).
  2. ^ a b Fosdick, Howard (2005). Rexx Programmer's Reference. Wiley Publishing. ISBN 0-7645-7996-7.
  3. ^ "7 Reasons that Rexx Still Matters". SmartBear.com. Retrieved 2024-06-19.
  4. ^ a b "IBM Object REXX - EDM2". www.edm2.com. Retrieved 2024-06-19.
  5. ^ Nash, Simon C. (1990-06-11). "Object Oriented REXX" (PDF). Proceedings of the REXX Symposium for Developers and Users: 76-100.
  6. ^ Nash, Simon C. (2009-05-21). "An Object Rexx Retrospective" (PDF). Proceedings of the 20th Rexx Language Symposium.
  7. ^ "IBM Object REXX for OS/2 - EDM2". www.edm2.com. Retrieved 2024-06-19.
  8. ^ "IBM Object REXX Now Runs on Windows NT and Windows 95". IBM. 1997-02-25.
  9. ^ Schweizer, Manfred; Berger, Uwe (2005-04-21). "From Object REXX to ooRexx" (PDF). Proceedings of the 16th Rexx Language Symposium.
  10. ^ "IBM Object REXX for AIX - Object-Oriented Scripting Language for Beginners to Advanced Programmers". IBM. 1999-03-30.
  11. ^ "IBM Object REXX for Windows V2R1 - Object-Oriented Programming for Beginners to Advanced Users". IBM. 2001-03-20.
  12. ^ "Software withdrawal and service discontinuance: IBM Object REXX". IBM. 2004-10-12.
  13. ^ "RexxLA - Rexx Symposia". www.rexxla.org. Retrieved 2024-05-17.
  14. ^ "ooRexx (Open Object Rexx) - Browse /oorexx at SourceForge.net". sourceforge.net. Retrieved 2024-05-18.
  15. ^ "ooRexx (Open Object Rexx) - Browse /oorexx-docs at SourceForge.net". sourceforge.net. Retrieved 2024-05-18.
  16. ^ Flatscher, Rony G. (2023). "The IntelliJ IDEA Plugin ooRexxPlugin 2.2 for Rexx and ooRexx 5.0" (PDF).
  17. ^ "IBM Object REXX for OS/2 - EDM2". www.edm2.com. Retrieved 2024-06-19.
  18. ^ "IBM Object REXX Now Runs on Windows NT and Windows 95". IBM. 1997-02-25.
  19. ^ "IBM Object REXX for AIX - Object-Oriented Scripting Language for Beginners to Advanced Programmers". IBM. 1999-03-30.
  20. ^ "IBM Object REXX for Windows V2R1 - Object-Oriented Programming for Beginners to Advanced Users". IBM. 2001-03-20.
  21. ^ "ooRexx News". Sourceforge. Retrieved 18 May 2024.
  22. ^ Open Object Rexx Reference Version 3.0.0 Edition (PDF). RexxLA. 24 March 2005. Retrieved 18 May 2024.
  23. ^ "ooRexx News". Sourceforge. Retrieved 18 May 2024.
  24. ^ "ooRexx News". Sourceforge. Retrieved 18 May 2024.
  25. ^ "ooRexx News". Sourceforge. Retrieved 18 May 2024.
  26. ^ "ooRexx 4.0.0: Readme" (PDF). Retrieved 18 May 2024.
  27. ^ "ooRexx 4.1.0: ReleaseNotes". Retrieved 18 May 2024.
  28. ^ "ooSQLite: Readme". Retrieved 18 May 2024.
  29. ^ "ooRexx 4.2.0: Changes". Retrieved 18 May 2024.
  30. ^ "ooRexx 5.0.0: Changes". Retrieved 18 May 2024.
  31. ^ Where did SOM support go in 4.0.0?
  32. ^ Willis Boughton (2004). "SOM and Object REXX". EDM/2. Retrieved 2014-02-02.
  33. ^ "Accessing Workplace Shell Objects". Object REXX Reference. IBM.
  34. ^ "Does ArcaOS include REXX support?". Retrieved 2020-09-03.
  35. ^ Cowlishaw, Mike (1987). "The design of the REXX language". ACM SIGPLAN Notices. 22 (2): 26–35. doi:10.1145/24686.24687.
  36. ^ a b c d e Ashley, W. David; Flatscher, Rony G.; Hessling, Mark; McGuire, Rick; Peedin, Lee; Sims, Oliver; Wolfers, Jon (2022). ooRexx Documentation 5.0.0 Open Object Rexx Reference (PDF). RexxLA.
  37. ^ Stefik, Andreas; Siebert, Susanna (2013). "An empirical investigation into programming language syntax". ACM Transactions on Computing Education. 13 (4): 1–40. doi:10.1145/2534973.
  38. ^ a b c d Flatscher, Rony G.; Winkler, Till. "Employing the Message Paradigm to Ease Learning Object-oriented Concepts and Programming" (PDF). In 2024 47th MIPRO ICT and Electronics Convention (MIPRO): 1244–1249.
  39. ^ a b c Winkler, Till; Flatscher, Rony G. "Cognitive Load in Programming Education: Easing the Burden on Beginners with REXX" (PDF). Central European Conference on Information and Intelligent Systems.
  40. ^ Ashley, W. David; Flatscher, Rony G.; Hessling, Mark; McGuire, Rick; Peedin, Lee; Sims, Oliver; Wolfers, Jon (2022). ooRexx Documentation 5.0.0 Rexx Extensions Library Reference (PDF). RexxLA.
  41. ^ Ashley, W. David; Flatscher, Rony G.; Hessling, Mark; McGuire, Rick; Peedin, Lee; Sims, Oliver; Wolfers, Jon (2022). ooRexx Documentation 5.0.0 RxMath Math Functions Reference (PDF). RexxLA.
  42. ^ Ashley, W. David; Flatscher, Rony G.; Hessling, Mark; McGuire, Rick; Peedin, Lee; Sims, Oliver; Wolfers, Jon (2022). ooRexx Documentation 5.0.0 RxSock TCP/IP Socket Functions Reference (PDF). RexxLA.
  43. ^ Ashley, W. David; Flatscher, Rony G.; Hessling, Mark; McGuire, Rick; Peedin, Lee; Sims, Oliver; Wolfers, Jon (2022). ooRexx Documentation 5.0.0 RxFtp Class Library Reference (PDF). RexxLA.
  44. ^ a b Ashley, W. David; Flatscher, Rony G.; Hessling, Mark; McGuire, Rick; Peedin, Lee; Sims, Oliver; Sims, Oliver; Wolfers, Jon (2022). ooRexx Documentation 5.0.0 Windows Extensions Reference (PDF). RexxLA.
  45. ^ Ashley, W. David; Flatscher, Rony G.; McGuire, Rick; Miesfeld, Mark; Peedin, Lee; Sims, Oliver; Wolfers, Jon (2022). ooRexx Documentation 1.0.0 ooSQLite Reference (PDF). RexxLA.
  46. ^ Ashley, W. David; Flatscher, Rony G.; McGuire, Rick; Peedin, Lee; Sims, Oliver; Wolfers, Jon (2019). ooRexx Documentation 4.2.4 ooDialog Reference (PDF). RexxLA.
  47. ^ Ashley, W. David; Flatscher, Rony G.; Hessling, Mark; McGuire, Rick; Peedin, Lee; Sims, Oliver; Steinböck, Erich; Wolfers, Jon (2022). ooRexx Documentation 5.0.0 nCurses Class Library Reference (PDF). RexxLA.
  48. ^ Ashley, W. David; Flatscher, Rony G.; Hessling, Mark; McGuire, Rick; Peedin, Lee; Sims, Oliver; Steinböck, Erich; Wolfers, Jon (2022). ooRexx Documentation 5.0.0 Unix Extensions Function Reference (PDF). RexxLA.
[edit]