Skip to content
Discussion options

You must be logged in to vote

There have been a few proposals (such as #399) for turning an impl IterParser into an impl Iterator. In fact, an experiment implementation exists within the source code and a function to invoke it.

The reason it's not progressed so far is that it's not entirely clear how to properly represent errors. Having the iterator produce items of type Result<T, E> feels too ungainly to be useful, but representing errors 'out-of-band' means that they're highly likely to be accidentally forgotten about, resulting in unintentional behaviour.

I'd be interested in your thoughts on this!

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@jnhyatt
Comment options

@zesterer
Comment options

@jnhyatt
Comment options

@zesterer
Comment options

@jnhyatt
Comment options

Answer selected by jnhyatt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants