Stream: announcements

Topic: Breaking change: removing Iter.rev and Iter.take_last


view this post on Zulip Richard Feldman (Aug 08 2026 at 01:45):

we currently have an assumption that iterators are reversible, but I think that was a mistake in hindsight. Some custom iterators simply aren't (e.g. an infinite range), or have terrible performance if you reverse them (e.g. a linked list), and I think it's better to just expose things like List.iter_rev from only the data structures that can reasonably offer reversed iterators, instead of having the reversal operation in Iter itself.

view this post on Zulip Richard Feldman (Aug 08 2026 at 01:46):

(I haven't landed his change yet, but I'll be opening a PR for it soon.)


Last updated: Aug 12 2026 at 12:35 UTC