synonyms

Richard Gaskin ambassador at fourthworld.com
Tue Jun 27 14:19:08 EDT 2017


Lagi Pittas wrote:

> We are still awaiting the open language that was promised.
> 
> Now I don't know exactly how that will work in the sense is it going to be
> all or nothing - a free for all where you can add/change  syntax more like
> a souped up preprocessor, or allow for change to a different language
> (python, Ruby, php on a per procedure/function basis or the easier first
>  step a script only stack in the language of your choice.
> 
> Everyone can have their cake and eat it.

I don't know when OL will be available or how it'll work.  I only know 
one thing it won't support, based on an earlier conversation with Mark 
Waddingham:  R-style arguments (similar in many respects to CSS values).

In R, things like the plot command have reasonably-useful defaults, so 
that you can just pass in data with nothing else and get a useful result.

But if you want to tailor it you pass arguments in as name-value pairs, 
e.g.:

   plot(cars, type="o", col="blue", ylim=c(0,12))

What I like about that is I'm free from having to remember parameter 
order, which also means I don't need to add a hundred commas if I want 
to pass in a value for the 101st param.

With name-value pairs I can include only the options I want, and in any 
order.

Extra bonus points that the purpose of any argument is made explicit by 
including its name.  If I see "o" I don't need to count commas and guess 
about what that applies to, I know very clearly looking at the name 
provided with it that it governs the plot type.

This may be even more verbose than xTalk for handlers with just one or 
two args.

And as much as I like it in R, I'm not sure I would advocate it in an 
xTalk as any sort of necessity.  It might be ideal for certain types of 
commands (oh how I'd love it with "export"), but is so unusual compared 
to most other languages that it may just increase the learning curve for 
most folks.

I bring it up here not as a recommendation, but just as a sort of "think 
REALLY different" exercise as we consider alternative syntax 
possibilities...

-- 
  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