I do lots of stuff in classic REXX. Admittedly on OS/2 I use the built-in REXX support, it just plain works.
...
So true all you wrote.
It's fairly easy to write a REXX extension library that can use C libraries, but someone has to do it.
It's even easier with a String class that can handle and convert from/to numbers and strings.
I dislike Python because of the strict and rigid indention rules.
===
OS/2 REXX is integrated with the os.
Regina is a separate executable.
Regina lack something I've come across and use in Classic REXX under OS/2-eCS.
/* "Main" entry of script */
stem.0 = 2
stem.1 = "Hello"
stem.2 = "World"
my_array.0 = 4
my_array.1 = "Say"
my_array.2 = "hi!"
my_array.3 = "to"
my_array.4 = "everyone"
my_variable = "Some text"
dont_expand_variable = "Exposed variable"
expand_variable = "stem. my_array. my_variable"
dont_expand_variable = "Hello!"
RETURN rexx_function_name()
/* Function below */
rexx_function_name PROCEDURE EXPOSE (expand_variable) dont_expand_variable
SAY expand_variable
SAY dont_expand_variable
DO i = 1 TO WORDS( expand_variable )
check_variable = SUBWORD( expand_variable, i, 1 )
IF RIGHT( check_variable, 1 ) = '.' THEN
/* Assume this is a stem (array of accessible values).*/
DO j = 1 TO VAL( check_variable'0' )
/* Will output the text set in "main" */
SAY VAL( check_variable''j )
END
END
RETURN 0
The above code work in OS/2 Classic REXX and output "stem. my_array. my_variable" AND you can access the contents of stem.0 , stem.1, ... stem.N and my_array.0, my_array.1 ... my_array.N and my_variable just as with "dont_exand_variable" that will output the text "Exposed variable".
The same goes for parsing...
In OS/2 Classic REXX you can
...
/* Example code for PARSE below */
delimiter = "/"
text_2_parse "this is an example of text/code to split on the character with / into smaller parts."
DO WHILE POS( delimiter, text_2_parse ) > 0
PARSE text_2_parse WITH pre(delimiter)test_2_parse
SAY pre
END
SAY test_2_parse
/* end of example */
Would output:
this is an example of text
code to split on the character with
into smaller parts.
======
ADDRESS in Regina is something I like that is very powerful.