You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@freemarker.apache.org by Daniel Dekany <dd...@apache.org> on 2019/10/26 23:17:02 UTC

Please review ?spread_args, and .args feature

Hello all,

As part of FREEMARKER-107 ?spread_args(arguments) and .args were added.
They are related to functionality that's somewhat similar to Python
**kwargs, and to currying in functional programming. This activity had no
sign here, on the dev list, so please review it, and discuss it here.
Description:

   - ?spread_args:
   https://freemarker.apache.org/builds/fm2/ref_builtins_expert.html#ref_builtin_spread_args
   - .args:
   https://freemarker.apache.org/builds/fm2/ref_specvar.html#specvar.args

 The evolution of the feature on Jira:
https://issues.apache.org/jira/browse/FREEMARKER-107

(Full list of changes in 2.3.30 so far:
https://freemarker.apache.org/builds/fm2/versions_2_3_30.html)

The Maven artifacts are in the Apache snapshot repository:
https://repository.apache.org/content/repositories/snapshots

One thing I want to change is the built-in name, from spread_args to
with_args. Consider:

<@m?spread_args(commonDefaults) x=1 y=2 />
<@m?spread_args(.args) x=1 y=2 />


VS

<@m?with_args(commonDefaults) x=1 y=2 />
<@m?with_args(.args) x=1 y=2 />


What do you think?

Re: Please review ?spread_args, and .args feature

Posted by Pascal Proulx <pp...@ilscipio.com>.
I have no problem with the name change. Shorter works for me. Thanks Daniel

On 10/26/19 7:17 PM, Daniel Dekany wrote:
> Hello all,
>
> As part of FREEMARKER-107 ?spread_args(arguments) and .args were added.
> They are related to functionality that's somewhat similar to Python
> **kwargs, and to currying in functional programming. This activity had no
> sign here, on the dev list, so please review it, and discuss it here.
> Description:
>
>     - ?spread_args:
>     https://freemarker.apache.org/builds/fm2/ref_builtins_expert.html#ref_builtin_spread_args
>     - .args:
>     https://freemarker.apache.org/builds/fm2/ref_specvar.html#specvar.args
>
>   The evolution of the feature on Jira:
> https://issues.apache.org/jira/browse/FREEMARKER-107
>
> (Full list of changes in 2.3.30 so far:
> https://freemarker.apache.org/builds/fm2/versions_2_3_30.html)
>
> The Maven artifacts are in the Apache snapshot repository:
> https://repository.apache.org/content/repositories/snapshots
>
> One thing I want to change is the built-in name, from spread_args to
> with_args. Consider:
>
> <@m?spread_args(commonDefaults) x=1 y=2 />
> <@m?spread_args(.args) x=1 y=2 />
>
>
> VS
>
> <@m?with_args(commonDefaults) x=1 y=2 />
> <@m?with_args(.args) x=1 y=2 />
>
>
> What do you think?
>

-- 
Pascal Proulx
Software Developer
ilscipio GmbH
Am Drosselschlag 7
D-35452 Heuchelheim
Germany
www.ilscipio.com | www.scipioerp.com