In Rexx we typically have this well-known distinction between a function
call and a "procedure" CALL.  The former requiring brackets, the latter
won't accept brackets.

say lineout(.stdout, "line")
call lineout .stdout, "line"

On the other hand, with ooRexx message terms (and also in other languages
like C) I learned to love the more simpler forms - both of which with
brackets

written = .stdout~lineOut("line")
.stdout~lineOut("line")

Sometimes, when switching a line of code from the function to the CALL
form, I forget about removing the brackets, and I'm left with e. g.

call lineout(.stdout)
call lineout(.stdout, "line")

(Somewhat surprisingly) the single-argument form CALL function(arg) works
as expected, and the multiple-argument form CALL function(arg1, arg2, ..
argn) used to give Error 37.1:  Unexpected "," for Rexx before 5.0.
Starting with Rexx 5.0, due to the new array term syntax, CALL
function(arg1, arg2, .. argn) is interpreted as CALL function
.Array~of(arg1, arg2, .. argn)~makeString and may or may not fail depending
on function() but will most surely not do what was intended.

(The example call lineout(.stdout, "line") quietly does nothing, most
probably because Cr/Lf character aren't supported in a filename).

With above said, I'm proposing to allow
CALL function(arg1, arg2, .., argn)
(with no space between function and the bracket) to be functionally
equivalent to
CALL function arg1, arg2, .., argn

I believe that this change - if done before 5.0 is released - should not
break existing code.

What do you think?
Pros and cons, anyone?
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Oorexx-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to