On 20/04/2024 12:41 am, Rony G. Flatscher wrote:

It is an attempt to apply dynamic typing to reduce the need to write the explicit type. This service gets carried out by the compiler. In true dynamically typed languages you can reuse variables like "start" or "tmp" to refer to values of different types.

It's very specifically not an attempt to apply dynamic typing. It's type inference, and can only be used when the compiler can determine the type. The resulting type is still static. There's no practical difference between

var start = ZonedDateTime.now();

and

ZonedDateTime start = ZonedDateTime.now();

except for the amount of code that needs to be written.


A dynamic language when executing code needs nevertheless to check whether interaction with the dynamically typed values is correct or not.

This is one of the reasons I prefer static languages. Run time errors can go unnoticed until they are discovered on a customer system. Compile time errors are almost certain to be discovered in the development environment. (Or for in-house programming, compile time errors are discovered in development during business hours, runtime errors might be discovered in production at 3am...)

Any error that can be found at compile time instead of runtime is a win.


No the Java syntax is all in all much more complex. You note that when teaching novices Java and compare that to teaching novices Rexx or ooRexx (I have experiences in both).

There might be a distinction between the difficulty of writing a program that runs, and writing a program that is correct.


Well in Rexx concatenation rules are quite intuitive, surprisingly there is a blank concatenation operator (a blank between concatenated strings), an abuttal concatenation operator (no blank between concatenated strings) and using the explicit concatenation operator || (no blank between concatenated strings). Novices have no problems to understand:

   a=1
   say a "- hello!"    -- concatenation with a blank ...........: 1 - hello!    say a"- hello!"        -- abuttal, concatenation without a blank: 1- hello!    say a || "- hello!"    -- concatenation with || operator .......: 1- hello!

I had no problem back in the day when I first learnt it, but having learnt other languages since I don't think this is intuitive. Particularly the added blank between strings (I agree it is surprising). There are other variations here, e.g. I'm not sure how abuttal works with 2 variables rather than a variable and a literal.


Rexx defines the value of variables that have no explicit value assigned to them to be the name of the variable in uppercase, so it does not cause a problem. (It does cause problems for programmers who got trained to always make sure that a value is assigned to variables. This is the reason why ooRexx has an option to activate checking for the use of uninitialized variables in Rexx programs to appease those who are not accustomed to it or feel that it should not be allowed. ;) )

It doesn't cause a problem except when it does. One danger is a typo in a variable name. When I wrote some complex Rexx I did use SIGNAL ON NOVALUE, but I wasn't totally appeased!

I'm not trying to be negative about Rexx. I still use it when appropriate. But I think z/OS people make a mistake ignoring Java. It's fast (e.g. 1GB/s for my CICS SMF processing), makes powerful features available (e.g. the Twilio example to send SMS messages from z/OS) and it's available on pretty much every z/OS system now.


--
Andrew Rowley
Black Hill Software

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to