What is NetRexx
NetRexx is a programming and scripting language which has been designed to be a simple, effective, and complete alternative to the Java language. With NetRexx, you can create applications and applets for the Java environment faster and more easily than by programming in Java – and you can compile or interpret them, as appropriate. The new -prompt option allows very fast (usually sub-second) compilation or interpretation of most classes.
Using Java classes is especially easy in NetRexx, as the different types of numbers and strings that Java expects are handled automatically by the language. NetRexx classes and Java classes are entirely equivalent – NetRexx can use any Java class (and vice versa).
Here's what a "Hello World" program looks like in NetRexx:
/* A program, written in NetRexx */
say 'Hello World!'
Initial measurements using the current implementation suggest that the Java source for a typical class has approximately 35% more lexical tokens and requires 20% more keystrokes than the equivalent in NetRexx.
The free reference implementation for the language can either interpret the language directly, or it can compile it into pure Java .class files. In the latter case it first translates the NetRexx source code into Java source code; this is then compiled in turn to generate the Java bytecodes (class files) for execution. The Java code can be kept for maintenance, and can also be used to generate javadoc documentation.
The compiler/interpreter is (of course) written in NetRexx, and should run on any Java platform that supports a Java 1.1.2 (or later) toolkit and compiler (javac). By default, NetRexxC automatically calls the javac compiler to create class files, but you can use other Java compilers if you wish. No Java compiler is needed to interpret NetRexx programs, though Java 2 (1.2) is needed for this.
NetRexx 1.1 includes many new features, including some that especially simplify the programming of the Java 1.1 event model, inner classes, and JavaBeans. NetRexx 2 supports direct interpretation and other new features.
NetRexx is inspired by two very different programming languages, Rexx and Java (link resides outside of ibm.com). It blends the clean easy-to-learn syntax of Rexx with the robustness and portability of the Java environment. The result is a language which is tuned for both scripting and application development, and is designed for both interpretation and compilation. It is therefore truly general-purpose.