-
Notifications
You must be signed in to change notification settings - Fork 152
Why ForEachKey when we have iterators? #223
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
Comments
I did consider implementing this as a new iterator (it actually does not match the existing iterators exactly because it combines My reasons were
The efficiency thing I'm not too worried about ... I have some plans to overhaul our internal representation of trees to improve cache efficiency and iteration logic anyway ... but the other issues, I believe, are why the existing iterators are implemented for I'm open to the argument that we should just bite the bullet and write all this code, in the interest of being idiomatic. |
Yeah, I see the reasoning... Will try to think and play whether there can be anything done in practice with iterators, or we will be limited by a exponentially growing complexity |
Yeah I agree that a |
Sorry for potentially dumb question, but why do we need
ForEachKey
if we already have iterators? I checked trait implementations, they seem to replicate the code from iterators — and iterators should be more idiomatic than custom trait...The text was updated successfully, but these errors were encountered: