On Thu, 19 Feb 2026 09:35:31 +0900, Alexandre Courbot wrote:

[...]

> I asked this a couple of times ([1], [2]) but got no reply, so let me
> try again. :) Given that `list_head` is doubly-linked, can we also
> implement `DoubleEndedIterator`?
> 
> This can be done in a follow-up patch but should be there eventually as
> C lists are often parsed in both directions.
> 
> [1] https://lore.kernel.org/all/[email protected]/
> [2] https://lore.kernel.org/all/[email protected]/

There was a lot of redesign and you only mentioned it as an optional
suggestion and there several higher priority comments.

Anyway, I disagree. I don't think there's a use case for
DoubleEndedIterator at the moment -- none of the current users of clist need
reverse iteration. I'd prefer to keep the interface minimal and add it when
there's an actual need for it, rather than adding API surface that nobody
uses. If a usecase comes up, we can always trivially add it.

(will look at other comments in the morning, its night for me).

Thanks,

-- 
Joel Fernandes

Reply via email to