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
 ahsoftw...@gmail.com


_______________________________________________
use-livecode mailing list
use-livecode@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to