Guessing game
Mark Wieder
ahsoftware at sonic.net
Tue Apr 3 22:11:27 EDT 2018
On 04/03/2018 12:51 AM, Mark Waddingham via use-livecode wrote:
> One could imagine a similar thing being added to the arithmetic commands:
>
> add tLeft to tRight into tResult
>
> Would do nothing different from:
>
> put tLeft + tRight into tResult
>
> This would just be a different way of expressing the same thing
> syntactically. (Note the 'into' form has not been added to the
> arithmetic commands, and there is no binary intersect/union operator -
> but perhaps both should be considered).
Hmmm... and perhaps not.
I find
put tLeft + tRight into tResult
much more intuitive and readable than
add tLeft to tRight into tResult
In the latter, is tRight modified or not? It's not easy to determine
that from reading the code, whereas in the first form it seems obvious
that neither of the lValues are modified.
Also, what if you wanted to add three numbers instead of just two?
add tWhiskey to tTango to tFoxtrot into tTotal
Even if "to" isn't the right preposition here, replacing it with "and"
or "plus" still gives weird non-natural syntax.
--
Mark Wieder
ahsoftware at gmail.com
More information about the use-livecode
mailing list