LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Classic View

Use Monospaced Font
Show Text Part by Default
Condense Mail Headers

Topic: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Mime-Version: 1.0 (Apple Message framework v1077)
Content-Type: text/plain; charset=us-ascii
Date: Sat, 13 Feb 2010 11:50:41 +1030
Reply-To: Mailing list for the LaTeX3 project <[log in to unmask]>
From: Will Robertson <[log in to unmask]>
Message-ID: <[log in to unmask]>
In-Reply-To: <[log in to unmask]>
Content-Transfer-Encoding: 8bit
Sender: Mailing list for the LaTeX3 project <[log in to unmask]>
Parts/Attachments: text/plain (27 lines)
On 13/02/2010, at 11:37 AM, Philipp Stephani wrote:

> expl3 itself uses \exp_arg:x in disguise, e.g. in l3tl.dtx, l. 1504:
> \cs_set_nopar:Npn \tl_tmp:w #1 {
>  \tl_set:Nx \l_tmpa_tl {
>    \exp_not:N \prg_new_conditional:Npnn \exp_not:c {tl_if_eq:#1}
>      ####1 ####2 {p,TF,T,F} {
>        \exp_not:N \tex_ifnum:D
>        \exp_not:c {tl_compare:#1} {####1}{####2}
>        \exp_not:n{ =\c_zero \prg_return_true: \else: \prg_return_false: \fi: }
>    }
>  }
>  \l_tmpa_tl
> }
> Codes like that are very common. I also think that this is not too elegant, but in many cases there is no other way. \edef lets you specify completely arbitrary combinations of expansions, something that is impossible otherwise. It doesn't matter that it is not expandable because the result must be executed anyway.

I've proposed adding this version of \exp_arg:x to expl3 relatively recently.
(It's the first on the list of l3candidates.dtx.)

Your feedback helps us to decide whether it should be included.
Any thoughts from others?

-- Will