I have a real-world case where I need Python style iterators for performance. It's not good to eager-evaluate an event-list 259K items when you know that in the typical case you're only going to select two or three orders of magnitude fewer of them to be passed to a work function. (The list is of commit events in a version-control repository; the selector might be something like "commited within 24 hours of time t").
There's an obvious, clumsy way to do this by having a factory pass back a stateful iterator object: for iterator := IteratorFactory(selector); iterator.Continue();iterator.Next (){ DoSomethingWith(iterator.Value()) } What one would really like to be able to do, though, is much more concise: for i, v := range iteratorFunction() { DoSomethingWith(i, v) } Before I post an RFE, are there rejected iterator proposals I should read so I don't waste anyone's time on stale ideas? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.