Hello,

My name is Noam Yorav-Raphael. I find Rust to be a really exciting language!

I have a simple suggestion: the current implementation of zip() returns an
iterator which stops whenever one of the two iterators it gets stop.
I use zip() in python quite a bit. I always have a few lists, where the
i'th value in each corresponds to the same thing. I use zip in python to
iterate over a few of those lists in parallel.

I think this is the usual use case. In this use case, when the two lists
have a different length it means that I have a bug. it seems to me that
Python's behavior, and current Rust behavior, is contrary to "Errors should
never pass silently" from the zen of Python.

What do you think of changing this, so that zip() will fail in such a case?
Another iterator, say, "zipcut" can implement the current behavior if
needed.

It will be my pleasure to implement this, if the suggestion is found useful.

Thanks, and have a nice day,
Noam
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to