-
Notifications
You must be signed in to change notification settings - Fork 12.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Stabilize step_by for 1.2.0 #25798
Stabilize step_by for 1.2.0 #25798
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see CONTRIBUTING.md for more information. |
There was a discussion about
This is also #23588. Is any of this resolved? Does stabilizing hinder any progress on this? |
I guess that we could make negative numbers in |
As @killercup mentioned, the main outstanding question preventing this API from stabilizing is deciding what to do about negative steps. Adding undefined behavior probably isn't something we want to do to a core iterator adaptor, so we'll need to make a decision on this one way or another. There's also the question about the Just points to consider! |
Yeah, we may still want to wait to stabilize, since we don't have negative steps yet. I think that negative steps should (conceptually) work like reversing the range and stepping over the reversed range with a positive step. (EDIT) I think that's how it works for two-sided ranges now, but not one-sided ranges. |
☔ The latest upstream changes (presumably #26066) made this pull request unmergeable. Please resolve the merge conflicts. |
step_by is generally useful (it was used in multiple places in the standard library). When it landed in mid-March, it was marked unstable because it was a "recent addition" to the API. It's been two months, and there seems to be no controversy about its inclusion in Rust. Therefore, I propose that we stabilize step_by.
a2d77f8
to
76a3006
Compare
Ok, after some discussion it seems like it may still be somewhat premature to stabilize this function just yet. We'd like to take some more time to talk about the interaction of |
step_by
is generally useful (it was used in multiple places in thestandard library). When it landed in mid-March, it was marked unstable
because it was a "recent addition" to the API. It's been two months, and
there seems to be no controversy about its inclusion in Rust. Therefore,
I propose that we stabilize
step_by
.