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

>
>
> Now that the ADDRESS WITH activity is moving along somewhat, I thought I
> might revisit an idea that has been kicking around since the early days of
> the project. This was a question of allowing some form of call-by-name to
> the language.
> ....
> I'm a little torn over whether this is needed or not, but the fact that
> people keep trying to do this via USE ARG argues there is demand for some
> sort of call-by-name capability. Anyway, the prototype appears to be
> working, though there are a few more tests that need to be written. This
> can be built and played with.
>
>
> Also wondering if it's needed .. I've been using USE ARG for this for many
> years, using for example:
>
> In the caller:
>
>   data.['admin']=0
>  call foobar data.
>
> and in the callee:
>
>   use arg data
>  admin=data.['admin']    -- shorthand, which could of course use a
> different target name
> Since there are often dozens of variables it's safer and simpler to
> collect them together in some way rather than list them in some specific
> order and have to remember which matches which?
>
> Separately, the '&' prefix is horribly C-like, but only on one side of the
> transaction ... and C is the only reason for using for choosing that
> operator; something that implied a reference might be better?  Perhaps '^',
> for 'upwards reference'?   Or even '=' or '<-' ....
>

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.

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