Re: Since NetRexx is.....

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: Since NetRexx is.....

Larry Forrister
The two sides in this little controversy seem to be expressed well in the following quotes:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>I say, let it stop here. NetRexx is not clasicRexx, it's a language that
>allows programmers to develope Java code in an easy and effient manner. That
>said, if it can be done in Java, it should be able to be done in NetRexx...
>
>N+1... Great idea...
>
> Jerry McBride
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>But, NetRexx is not the JAVA language. It is another mapping of the
>Java VM to a language (it just happens to do this by compiling to the
>Java language). It does not need to support the detailed syntax of the
>Java language.
>
> Nicholas J Gimbrone
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jerry is right, NetRexx is not clasicRexx.

Nicholas is right, NetRexx is not the JAVA language.

But I disagree with, "it's a language that allows programmers to develop Java code..."  I think most NetRexx users are more interested in the Java Virtual Machine byte code than with the intermediate Java source.  

As far as "if it can be done in Java."  It can be.  X = X+Z adds Z to X, the same as X += Z would in Java.  But the NetRexx syntax is explicit, not implied.

COBOL, well known as one of the most verbose computer languages, contains a similar syntax shortcut.  IF statement conditions can be abbreviated:

        IF XXX GREATER AAA AND EQUAL BBB AND LESS CCC THEN
        is equivalent to
        IF XXX GREATER AAA AND XXX EQUAL BBB AND XXX LESS CCC THEN

        and...

        IF XXX GREATER AAA AND BBB AND CCC THEN
        is equivalent to
        IF XXX GREATER AAA AND XXX GREATER BBB AND XXX GREATER CCC THEN

These examples seem far more intuitive and self-evident than +=, ++ and --.  Never the less, use of these abbreviated COBOL constructs is/was actively discouraged in many COBOL shops, precisely because they were not explicit.  

Let's keep it simple.


        Larry
        [hidden email]
       ---------------------------------------------
        You don't know anything well enough,
        until you can explain it to your grandma...

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>

Reply | Threaded
Open this post in threaded view
|

RE: Since NetRexx is.....

Patrick McPhee-3
Those of you who are tired of this discussion should stop reading now.

Larry Forrister wrote:

> As far as "if it can be done in Java."  It can be.  X = X+Z adds Z to
> X, the same as X += Z would in Java.  But the NetRexx syntax is
> explicit, not implied.
>
Both syntaxes are explicit, and they say to do different things. These
are two seperate operations, and generate different sets of bytecodes.

It's always a mistake to argue about what is intuitive or obvious,
because that always depends on ones past experience. Personally, I think
+=, as an operation, is easier to understand than x = x + y, because it
says what exactly you are doing (adding a value to x).

It is not obvious what += does, but it is also not obvious that x = x +
y assigns a new value to x, unless you happen to know that = does that
in some circumstances. Someone who is used to = being a test for
equality might assume that x=x+y is the same as y=0.

--
Patrick TJ McPhee
DataMirror Corporation
[hidden email]

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe from this mailing list ( ibm-netrexx ), please send a note to
[hidden email]
with the following message in the body of the note
unsubscribe ibm-netrexx <e-mail address>