synonyms

Alex Tweedly alex at tweedly.net
Thu Jun 29 12:57:11 EDT 2017


Mark,

are you trying to allow mixing of positional and named actual parameters ?

In your example, is "This is a chart" the actual parameter for the first 
or second positional parameter ?

Would it not be less confusing to expect (as Python does) that non-named 
parameters must come first in the actual usage, so they can be 
unambiguously allocated to the correct parameter place ?

[  i.e. SyntaxError: non-keyword arg after keyword arg ]

-- Alex.


On 29/06/2017 17:19, Mark Wieder via use-livecode wrote:
> On 06/28/2017 08:55 AM, Richard Gaskin via use-livecode wrote:
>
>>  > Even better.
>>  >
>>  > You solution illustrate more so than mine how easy it is to make
>>  > handler and functions that use name/value pairs if someone prefers
>>  > that model. The xtalk language really doesn't need any extensions
>>  > or enhancements to enable this.
>
> I think if the loophole of allowing space-separated parameters were 
> fixed then the following syntax might work, thus allowing the engine's 
> parser to differentiate between named parameters and otherwise (the 
> following would be four parameters, two of them named):
>
> DoSomething name: "my chart", "This is a chart", width: 100, pArray
>





More information about the use-livecode mailing list