LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

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
Subject:
From:
Bruno Le Floch <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Sun, 13 Mar 2011 16:14:31 -0400
Content-Type:
multipart/mixed
Parts/Attachments:
text/plain (1068 bytes) , seq-fixed.tex (14 kB)
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.

-- 
Regards,
Bruno


ATOM RSS1 RSS2