Rexx for everyone
Автор: David Mertz
Скачать книгу в формате pdf.
It's easy to get lost in the world of "little languages" -- quite a few have been written to scratchsome itch of a company, individual, or project. Rexx is one of these languages, with a longhistory of use on IBM operating systems, and good current implementations for Linux andother Free Software operating systems. Rexx occupies a useful ecological niche between therelative crudeness of shell scripting and the cumbersome formality of full systems languages.Many Linux programmers and systems administrators would benefit from adding a Rexximplementation to their collection of go-to tools.
The Rexx programming language was first created in 1979, as a very high level scripting languagethat had a particularly strong facility for text processing tasks. Since Rexx's inception, IBM hasincluded versions of Rexx with most of its operating systems -- all the way from its mainframes, toits mid-level systems, to end user OS's like OS/2 and PC-DOS. Other OS makers, such as Amiga,have also integrated Rexx as an always-available system scripting language. A number of ISVs,moreover, have created Rexx environments for many platforms. Somewhat late in the game, ANSIofficially adopted a standard for Rexx in 1996.
Nowadays (especially on Linux or BSD-derived OS's), most of those older implementationsof Rexx are primarily interesting as historical footnotes. However, two currently maintainedimplementations of Rexx remain available across a wide range of platforms, including Linux,MacOSX and Windows: Regina and NetRexx. Regina is a native executable, available as FreeSoftware source code, or pre-compiled to a large number of platforms -- install it pretty much asyou would any other programming language interpreter. NetRexx is an interesting hybrid. Thelanguage is a derivative of plain Rexx. Much like Jython or Jacl, NetRexx compiles Rexx-likesource code into Java bytecodes, and (optionally) runs the resulting .class file within a JVM.
NetRexx is an IBM project for compiling Rexx-like code for a Java Virtual Machine. In capabilitiesand programming level, Rexx can be compared most closely to bash plus the GNU text utilities Rexx for everyone (throwing in grep and sed for good measure); or maybe to awk or Perl. Certainly Rexx has moreof a quick-and-dirty feel to it than do, e.g., Python, Ruby, or Java. The verbosity -- or rather,conciseness -- of Rexx is similar to that of Perl, Python, Ruby or TCL. And Rexx is certainly Turing-complete, enables modules and structured programming, and has libraries for tasks such asGUI interfaces, network programming, and database access. But its most natural target is inautomation of system scripting and text processing tasks. As with shell scripting, Rexx allowsvery natural and transparent control of application; but compared to bash (or tcsh, ksh, etc.), Rexxcontains a much richer collection of built-in control structures and (text processing) functions.
Stylistically, the IBM/mainframe roots of Rexx show in its case-insensitive commands; and to alesser degree in the relative sparsity of punctuation it uses (preferring keywords to symbols). I tendto find that these qualities aid readability; but this is mostly a matter of individual taste.
Полный текст книги в формает pdf, можно скачать по этой ссылки.