Print

Print


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