Talk:BFC
Idea: Variadic template parameters
Example:
{printc:c:_{c}+.}
{prints:*s:{printc:{s}}_}
{prints:48:65:6C:6C:6F} (prints "Hello")
Explanation:
Any parameter name starting with *
is variadic, that means it notates a whole parameter group. A template can have at most 1 variadic parameter, and any passed parameters that go beyond the other parameters are assigned to the variadic group; that means the variadic parameter can have any amount from 0 to infinite parameters.
Variadic parameters cannot be used directly but must be passed to another variadic template or unpacked and wrapped in a group or template call. The group or template is then included one time for each value in the variadic parameter. Passing a variadic parameter to another template is written with an asterisk; unpacking omits the asterisk. Passing a variadic parameter to a variadic template has the same effect as if passing each member individually to the template, ie. the receiving template receives a list of all received parameters, no matter if they were passed from a variadic parameter, and packs them into its own parameters itself.
Passing an unpacked variadic parameter to a non-variadic template might be unsafe or difficult to implement, therefore I do not suggest to allow it.
Sinthorion (talk) 17:33, 23 October 2018 (UTC)
It's not "The zero operator"
Suggestion: Instead of "_" I normally use "=" that way adding a "quantifier" eg: "42=" sets the current cell to that value. The direct translation is "[-]++++++++++++++++++++++++++++++++++++++++++" in plain BF. Rdebath (talk) 19:10, 25 October 2018 (UTC)