Pure vs. Impure Iterators in Go
5 ingve 5 5/29/2025, 8:57:38 AM jub0bs.com ↗
Comments (5)
euroderf · 1d ago
Great! How about iterators on trees ? Multiple options to provide.
tapirl · 2d ago
Be careful there are bugs and design flaws in Go iterators: https://go101.org/blog/2025-03-15-some-facts-about-iterators...
jub0bs · 2d ago
Your post does show that iterators are somewhat of a leaky abstraction, but I'm not sure I would go as far as calling some of their infelicities "bugs". Whether those infelicities matter in practice is a moot point.
tapirl · 1d ago
The bug is confirmed: https://github.com/golang/go/issues/71685
jub0bs · 1d ago
Ok, that is annoying. I hope it gets fixed soon.