Re:Iterator patterns in Go
by ewencp on Sunday September 08, 2013 @12:40AM
(#6347855)
Fair enough. My day-to-day coding with Go right now involves large data sets where materializing something like that would be expensive. I'll admit my view of the issue is strongly biased by my very real need for iterators or something equivalent that can avoid that cost!
[ Parent
| on HN ]
Re:Iterator patterns in Go
by aaronblohowiak on Sunday September 08, 2013 @02:16AM
(#6348001)
in the callback approach, you can pass in the current item and a Breaker or maybe a RewindBreaker that you can easily _ when you don't care about it.