10 ms·
I'm ambivalent about changing so many functions to return iterators. It's cleaner for experienced coders, but harder to understand for beginners.
by bdr 18y ago
I'm ambivalent about changing so many functions to return iterators. It's cleaner for experienced coders, but harder to understand for beginners.
- dnaquin 18y agoMost of those changes get masked behind loops that I don't think either is very different for understanding. I think the plusses outweigh the edge cases.
- bdr 18y agoHaving taught a couple beginners, I can tell you that what you see when you print a variable is very important. So, I guess it depends how these objects convert to strs, but I was assuming it would show a zip or map object rather than the result.
- schtog 18y agowhat are the edge cases? what are the advantages of iterators? less memoryuse?
- eru 18y agoIterators get some of the benefits of lazy evaluation.