On Thu, Apr 12, 2018 at 12:19 PM Mike Cowlishaw <m...@speleotrove.com> wrote:

>
>
> 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.
>
>
> Ah yes .. remember now; just never had occasion to use it!
>
>
> 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.
>
>
> OK.
>
>
> 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.
>
>
> Yes, I wasn't keen on arrows or '^' either :-).
>
> But I'm even more un-keen on '&'.  <<shudder>>
>
> How about '*', then, as being still being one of the two ends of the C
> notation?
>

I’m even less keen on using *. Now that C++ allows you to declare arguments
as being references rather than pointers, I've been moving away from using
pointers as arguments. A resemblance to exec2 is not that strong of an
argument when you consider a large portion of the ooRexx users have never
even heard of the language.  And it's not like every variable is going to
suddenly acquiring a leading '&'. This will generally be used in a few
selective place, such as situations where you wish to return multiple
values back from a call or method.

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