LATEX-L Archives

Mailing list for the LaTeX3 project


Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

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

Print Reply
Joseph Wright <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Sun, 13 Mar 2011 22:08:50 +0000
text/plain (37 lines)
On 13/03/2011 20:14, Bruno Le Floch wrote:
> Hello all,
> <snip>
>> **So my question is: do we want to support braces in seq items or not?**
> Here is what I could code today. The absence of braces around each
> element makes most functions rather tricky to implement, although at
> most a factor of 2 in speed, I'd say. All the functions in the file
> I'm attaching are linear in the length of the seq (I think), i.e.
> quicker than storing the elements one by one in a new seq.
> The only reason to not brace items is to be able to find an item
> faster using delimited arguments, and that this will only work for
> "nice" items (i.e., no brace, no `#`). So I have the following more
> radical proposal: brace the arguments, and propose two searches,
> - one true search, which goes through each element and compares with
> `\tl_if_eq:nn`,
> - a `str`-like one, which detokenizes the seq, and searches for the
> detokenized version of `\seq_elt:n {<item>}` with a delimited argument
> (now ok, since everything is detokenized).
> That proposal would make the code much, much clearer in my opinion.
> Also slightly faster, but not more than two-fold.

I need to read through everything, but as you are looking at a total
reimplementation, more or less, do we really need two markers in a
sequence? I've got an 'alternative' sequence system to work with just
one (\q_seq), but at present it strips braces. (I know that because I
checked after you started this thread: I'd have suggested my version
Joseph Wright