On Thu Feb 19, 2026 at 9:59 AM JST, Joel Fernandes wrote: > 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.
It's a double-linked list still, and `DoubleEndedIterator` a standard Rust trait. Adding it now would spare us the trouble of deciding which tree takes the feature when it eventually lands. But even without it the series still stands, so your call.
