The design of the REXX language

Автор: by M. F. Cowlishaw

Дата: февраль, 1987

Источник: SIGPLAN Notices, V22 #2

Скачать полный текст статьи в  фо рм ате pdf .

  One way of classifying computer languages is by two classes: languages needing skilled programmers, and personal languages used by an expanding population of general users. REstructured eXtended eXecutor (REXX) is a flexible personal language designed with particular attention to feedback from its users. It has proved to be effective and easy to use, yet it is sufficiently general and powerful to fuffil the needs of many demanding professional applications. REXX is system and hardware independent, so that it has been possible to integrate it experimentally into several operating systems. Here REXX is used for such purposes as command and macro programming, prototyping, educa. tion, and personal programming. This paper introduces REXX and describes the basic design principles that were followed in developing it.

Computer languages may be classified in many ways. One way, for example, is to divide them into two usability classes: those for data processing professionals and those for the rest of the users. Most languages currently available (such as FORTRAN, COBOL, and c) have been designed as tools for professionals and require a significant amount of training before they can be used effectively. A few languages (notably BASlC and LOGO) have been designed with more general users in mind. As a result, these languages have found wide application in the field of personal computers. BASIC especially is widely used, but it was originally designed for simpler applications. The popularity of BASIC continues, and there have been many attempts to improve its structure and syntax. This has resulted in many different dialects of the language.

REstructured eXtended eXecutor (REXX) is a new language designed for the general user yet suitable for many professional applications. REXX borrows significantly from earlier languages, but it differs in one fundamental respect. Instead of being designed (consciously or otherwise) to be easy to compile or
easy to interpret, it is designed (with the help of feedback from hundreds of users) to be easy to use.

Three major factors affect the usability of a language. First, the basic concepts of a language affect its syntax, grammar, and consistency. Second, the history and development of a language determine its function, usability, and completeness. Third, but quite independently, the implementation of a language affects its acceptability, portability, and distribution. This paper introduces REXX and then discusses basic concepts and developmental history as applied to the design of the REXX language.

There are several experimental implementations of the REXX language within IBM for both large and small machines. One of these, by the author, has become a part of the Virtual Machine/System Product (VM/SP), as the System Product Interpreter for the Conversational Monitor System (CMS). The most complete published documentation of the language may be found in Reference I.

What kind of language is REXX?

REXX is a new language that allows programs and algorithms to be written in a clear and structured way. Its primary design goal was that it should be genuinely easy to use both by computer professionals and by the more casual general users. A language that is designed to be easy to use must be adept at manipulating the kinds of symbolic objects that people normally deal with: words, numbers, names, and so on. Most of the features in REXX are included to make this kind of symbolic manipulation easy. REXX is also designed to be highly system independent, but it has the capability of issuing both commands and conventional interlanguage calls to its host environment.

The REXX language structure covers several application areas that traditionally have been serviced by fundamentally different types of programming language.
Personal programming. REXX provides considerable function with powerful character and mathematical abilities in a simple framework. Short programs may

Command program interpreters are
increasing in importance in modern
operating systems.

be written with minimum overhead, yet facilities exist to allow the writing of robust large programs. The language is well suited to interpretation and is therefore rather suitable for the applications for which such languages as BASIC and LOGO are currently used. 23 REXX has proved to be an easy language to learn and to teach.