-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Make an Iterable trait to make it quicker for a programmer to iterate over something #524
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
IIRC such a trait requires higher kinded types, which is why we don't have it yet.= |
Actually, that does sound quite reasonable, didn't think of that. We'll see what the future brings and hopefully soon this will be possible |
See also #17 |
Ah, okay i did search for this kind of thing, but didn't see #17. |
See also the approved RFC 235. |
I believe this was done via |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently when we want to iterate over an Array we always have to call .iter() on that array. I suggest that there should be a trait to standardize this:
Now, rustc would check in for loops for instances of Iterable and automatically adding a .iter(). This would allow for code like this:
The old way would obviously still work, this would only be syntactic sugar
The text was updated successfully, but these errors were encountered: