On Thu, Apr 12, 2018 at 9:21 AM, Mike Cowlishaw <m...@speleotrove.com> wrote:

>
>
>
> I had similar thoughts, but I found that using '&' on both ends made
> things more understandable to the "normal" user. That is, the symmetry of
> using & on both the caller and receiver side connected these very firmly
> and only required explaining one piece of syntax. I'm hesitant to use the
> excuse of "it looks like C" as a reason not to use this. It would be
> understandable to people who already know C and easier to explain to those
> who don't.
>
>
> I agree that using the same notation at both ends is good.   But '&' is so
> particularly irksome .. the whole point of REX was to avoid the need for
> EXEC's '&' ... so it's doubly abrasive :-).
> '*' at both ends would make just as much sense to the C programmer, too.
>
> Or .. how about simple parentheses -- as already used in PARSE for a
> similar purpose, for example?    [I think we also considered   CALL (foo)
> a,b once, to allow call by a variable name.]
>

Considered? It has been implemented since the original Object Rexx version.
And the bit inside the parens is a generalized expression, not limited to
just a variable. Even PARSE no longer has a limitation of just a variable
name but has been opened up to an expression.

I had already considered the parenthesis approach and rejected it (I have
been thinking about this problem for 14 years :-)). Using parenthesis means
a) This is a special syntax that only applies to argument expressions with
special rules, b) Would probably break programs for people who insist on
coding call as "call foo(var)". I had also considered using square brackets
in a similar fashion.

The syntax I have now uses a general expression operator with no
compatibility problems.. This is not limited to just argument expressions.
So, for example, I can do

ref = &a

To obtain a reference to variable A. I'd prefer to keep this approach,
though am flexible on the "spelling" of the argument. I'm loathe to use "^"
because some Rexx implementations have accepted that as a synonym for
"prefix not" because of how the terminal emulators insisted on mapping the
mainframe logical not character. "@" might make sense, but this will
reraise the old mainframe variable name compatibility issue. "<-" might
work, but the USE ARG end really should be the other direction "->". I
suspect this would be difficult to work with and people would have a hard
time remembering which arrow to use in which place, which is the nice part
about using the same notation everywhere.

Rick



>
> Mike
>
> ------------------------------------------------------------
> ------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to