I have the pleasure to announce that sequence has reached its version 1.0. Sequence is a lightweight, high-performance library of iterators that is compatible with existing iter functions. Sequence 1.0 is a breaking release that comes with some simplification of the API and a bump of the minimum supported OCaml version to 4.02 that comes from jbuilder.
Nitpicking, but the claim in the comparison with gen that “Gen (external iterator) is more expressive than Sequence (internal iterator)” is false or at least incomplete. External iterators are more expressive for consumers and more constraining for producers, while internal iterators are more expressive for producers and more constraining for consumers. (For reference, see my old Gagallium blog post: Generators, iterators, control and continuations).
Ah, I forgot to link to your blogpost (fixed now). I’m slightly uneasy calling the producer side “expressiveness” but it’s indeed easier (and less demanding) to produce sequences. I do mention that gen is more difficult to produce.
A case where you want Labels is when you’re folding over a Sequence,
building another Sequence: apart from the folding function, is the first
parameter the accumulator or the sequence you’re folding ? This can (and
personally did) lead to nasty bugs that go totally unnoticed by the type
system.
Yet I’m not advocating for using Labels everywhere (and even less for
changing the existing API): SequenceLabels does address this issue
perfectly.