You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@freemarker.apache.org by Denis Bredelet <br...@mac.com.INVALID> on 2018/12/03 07:21:46 UTC
Re: Spread operator (splat operator) in FTL
Hi,
> On 25 Nov 2018, at 17:52, Daniel Dekany <dd...@apache.org> wrote:
>
>> The extra parameters don’t need to be made into a map. You could just use this syntax:
>>
>> <@my.fancyInput?apply(commonParams) type='text' size=10 />
>
> Good point! Although then that's some form of currying, not "apply",
> as the directive is not invoked by the built-in. But it's not normal
> currying either, as we don't specifying the parameters directly. I
> wonder what the built-in name should be. Maybe "spread_args":
>
> <@my.fancyInput?spread_args(commonParams) type='text' size=10 />
>
> Still not as nice as the specialized syntax, but certainly a better
> compromise than adding new syntax.
If I may do another suggestion, can we call this built-in “?set_args” or “?preset”?
I feel “spread args” could be too technical.
— Denis.