On Fri, Jun 16, 2017 at 2:41 PM, Daniel Dekany <[email protected]> wrote: ---->8---->8---- > Some very fundamental core directives still would have exceptional > syntax, such as: > > - Assignments (#var/#set as planned for FM3). They look as if they > have named parameter syntax first, but in the future we might want to > allow things like `<#set x[i] = 1>` or `<#set ns.var = 1>`. > > - #macro and #function: As in pretty much all languages, the syntax for > defining callable things is not the same as the syntax for calling > things. > > - `<#list xs as x>`... though maybe it's not exceptional. `x` is just > a loop variable, and I haven't talked about the standardization of > that in this thread. But in FM2 it's like `<@myDirective blah; > loopVar1, loopVarN>`. But `<#list xs; x>` is IMO not very readable. > Maybe we should just allow `as` in place of `;` for custom > directives, optionally.
How about <#list xs as="x"> or <#list xs>? The latter could make 'it' available implicitly. > > Along with these, I would like to remove `=` as a comparator operator > (an alias to `==`). It was already a problem in FM2, as it leads to > ambiguities because `=` is also used for named parameters, but if we > allow the above things, then it's a much bigger problem. +1 > > I also would like to allow using `-` unescaped in directive and > parameter names, like `<@my.foo-bar data-x=123 />` (This is a frequent > FM2 request, but couldn't be done because of `=`.) +0 (since I don't know why it has been requested and I usually don't use hyphen in names) Regards, Woonsan > > -- > Thanks, > Daniel Dekany >
