On Wed, Jun 21, 2017 at 2:30 PM, Daniel Dekany <[email protected]> wrote: > Friday, June 16, 2017, 8:41:37 PM, Daniel Dekany wrote: > >> A problem in FM2 is that when calling a directive (as a macro), either >> all parameters are positional (`<@message "Hi" 2 />`), or all >> parameters are named (`<@message content="Hi" height=2 />`); you can't >> mix the two (`<@message "Hi" height=2 />`). Also you can't use named >> parameters for functions/methods, only for directives. Worse, core >> directives don't even use named parameters, but some keyword like >> `as`, `using`... their syntax is hard coded into the parser, which is >> not nice, and will be a problem for the custom dialects feature. >> >> I think that with the exception of a few core directives (see them >> later) all directive calls should be like this, if for now (in this >> thread) we ignore loop variables: >> >> <#name posPar1 posPar2 namedPar1Name=namedPar1Value >> namedPar2=namedPar2Value> > > An adjustment to the above... I think that we should require comma > between positional arguments (but not between positional and named > arguments and between named arguments):
"but not between ..." means that a comma can be *optionally* placed between named arguments or between a positioned argument and a named argument, right? In other words, it is allowed to omit a comma between positional arg and named arg or between named args. Woonsan > > <#name posPar1, posPar2 namedPar1Name=namedPar1Value > namedPar2=namedPar2Value>
