iterator_item
iterator_item copied to clipboard
A syntax exploration of eventually stable Rust Iterator items
I have toyed with generator syntax myself, and my favorite syntax would be to use `=>` for the yield type, which IMHO is very readable and succinct, using the mnemonic...
This code is to support generator blocks (as seen on zulip!): ```rust type MyIterator = impl Iterator; let count = 20; let my_iter: MyIterator = gen { for i in...
This issue is primarily meant to log the semantic alternative I prefer. As it revolves around syntax to make `fn() -> impl FnMut() -> Option` rather than `fn() -> impl...
I don't understand why a specific marker (like the star next to `fn`) would be needed? I don't think that it was correctly justified. Bjarne Stroustroup, creator of C++, said...
I very much like the proposed `yield` syntax, and I think we should use that syntax. However, I don't want to hide the iterator type behind `yields`. I'd like to...
Here's another quick test :) Your & javascript's `fn*` + RFC 2996 (and regular rust) return types syntax. ```rust fn* foo() -> i32 { for n in 0i32..10 { yield...