Content-Type:
text/plain; format=flowed; delsp=yes; charset=iso-8859-1
Date:
Tue, 11 Dec 2007 12:57:24 +0100
Content-Transfer-Encoding:
7bit
MIME-Version:
1.0
|
On Mon, 10 Dec 2007 17:02:10 +0100, Frank Mittelbach wrote:
> Let us step back and reevaluate what the arg forms are supposed to mean:
>
[...]
> It makes no statements about what \foo:nnn does with the arguments it
> receives.
Yes, this is important I think. An n form may well be used by a function
to construct as csname internally (l3xref is an example).
> Some people have suggested we shouldn't provide the short forms, though
> I feel
> that they make life much easier once you get the hang of it,
(I can only say that I feel the same way as you.)
> but in any
> case they are only shorts for "manipulate some arguments prior to
> passing them to a function"
Agreed.
> There is a bit of inconsistency here in that something like T F are arg
> specifiers that give information about the argument purpose rather than
> about
> a manipulation of the argument and perhaps some of the concepts should be
> reviewed and unified -- but the direction should be less arg specifiers
> not more
If we have predicate functions \..._p:NN, what if the TF were called
\..._t:NNn, \..._f:NNn, and \..._t_f:NNnn instead? Besides removing two
argument specifiers, it would also mean we could do something better about
monstrosities such as
\bool_double_if:NNnnnn
which was something I needed somewhere but I knew the name was terrible
(from l3prg):
% Execute |#3| iff TT, |#4| iff TF, |#5| iff FT and |#6| iff
% FF. The name isn't that great but I'll have to think about
% that. Ideally it should be something with |TF| since only one of
% the cases is executed but we haven't got any naming scheme for
% this kind of thing so for now I'll just stick to simple |nnnn|.
With the slightly different syntax they could be
\bool_if_t:Nn <bool> {<true>}
\bool_if_t_f:Nnn <bool> {<true>} {<false>}
\bool_if_tt:NNn <bool> <bool> {<arg>}
\bool_if_tt_tf_ft_ff:NNnnnn <bool> <bool> {<tt>} {<tf>} {<ft>} {<ff>}
which I think isn't so bad at all.
--
Morten
|
|
|