NetRexx is a different approach to the programming language
Object-oriented and running on JVM, this scripting language is original in its construction and even strange.
The Rexx language (REstructured eXtended eXecutor) was created by Mike Colishaw in 1970 for IBM and implemented on the IBM 370. It was used as a scripting tool on OS/2. Its purpose was to provide a clear and structured syntax
NetRexx is an object-oriented version that was written in 1997 and compiles in Java bytecode to run on Java virtual machines (JVMs).
The latest version is dated 2013.

The king card (rex in Latin) is sometimes made
used to illustrate the language.
Why use NetRexx?
We don't talk much about NetRexx these days. It is actually little used outside the IBM environment.
REXX addressed the neophyte user, not the professional programmer. He might agree with the scientific calculation, but these days is largely supplanted by Julia and Python in the field.
NetRexx is intended to replace Java with simpler syntax, and was the first language other than Java to be ported to JVM. It also allows applets to be made using the Java API.
This is a way to use the same language for scripting and applications, but many other languages offer the same feature. Indeed, it has become common to carry the language in JVM (Jython, JRuby, etc.), which makes Netrexx useless for practical use because it is less complete.
His main interest is the study of a different approach in programming languages and simplifications in the syntax that it brings.
Control structures developed
The language combines simplicity of syntax with complexity of constructions.
- It is an object-oriented scripting language (unlike Rexx). It supports inheritance and generality (which Go lacks).
- The method ends when another method starts or at the end of the file. "Return" is used only for the return of the valuar.
- The body of the function ends with a white line, which is perhaps unique in programming languages, while Python alone uses indentation as part of the syntax.
- Select Assembly check box... quando... then is the NetRexx equivalent of a switch... case, but more powerful. Since there is no value for comparison with various cases, the interest appears to be mainly in the default value when no case is retained.
- Instruction block is restricted to do... end. When you add a condition, a loop is created .
The same general design up to.. thus, end replaces several types of loops in other languages (while, for, until...).
But this time it's not exactly a simplification, if you add while to do, it would be easier to use only while. - The same is true with the loop for construct, the word loop is redundant.
- Default string type for variables.
- A fixed-size array and an associative array are the only composite types except classes.
- The message appears in the console with the word SAY reserved, while other languages use echo (from Bash) or print (from Basic).
The NetRexx program can either be compiled into a bytecode or directly interpreted. In the first case, it is compatible with the Java API and its classes.
Despite the fact that the language brings many simplifications that make writing a script faster, its design looks fantastic and was perfect. This is a powerful language, but it doesn't bring anything special in terms of functionality .
Code samples from the NetRexx guide...
-- Demo: Attente d'une réponse
loop label prompt forever
reply=ask
select
when reply.datatype('n') then say reply**3
when reply='Quit' then leave prompt
otherwise say 'eh?'
end
end prompt
say 'Done.'
Applet with the inscription "Hello, world!":
class HelloApplet extends Applet
method init
resize(200, 40)
method paint(g=Graphics)
g.drawString("Salut le Monde!", 50, 30)
The applet is loaded with this HTML code:
<applet code="HelloApplet.class" width=200 height=40> </applet>
See also...
-
Scala is a
- popular language for scripting or for replacing Java with JVM .
- Rexx Languages Association. The association in which the NetRexx code issued by IBM resides. Note that the association uses lowercase letters, while the author used the name in capital letters.