Inconsistent comma requirements

Richard Gaskin ambassador at fourthworld.com
Sat Jun 24 13:51:17 EDT 2017


Alex Tweedly wrote:

 > On 24/06/2017 16:37, Richard Gaskin via use-livecode wrote:
 >> On the other hand, perhaps a rule could be introduced that any
 >> keywords used in arg strings with no commas when calling a custom
 >> handler are treated as literal text.
 > NO, please not.
 >
 > Just think of the consequences ...
 >    DoSomething tA and tB
 > is different from
 >    put tA and tB into temp
 >    DoSomething temp
 > and indeed from
 >    DoSomething (tA and tB)

Different, yet unambiguous, arguably more so than using "=" for 
comparison in most contexts but for assignment in variable declaration.

DoSomething tA and tB
-- "and" treated as a string, since it follows a custom command name

put tA and tB into temp
-- "put" is a built-in command, so "and" is a logical operator (and 
isn't "temp" a keyword?)

DoSomething (tA and tB)
-- Parens bypass any attempt to be English-like, forcing evaluation.


-- 
  Richard Gaskin
  Fourth World Systems
  Software Design and Development for the Desktop, Mobile, and the Web
  ____________________________________________________________________
  Ambassador at FourthWorld.com                http://www.FourthWorld.com




More information about the use-livecode mailing list