2 ms·
I think you're sugar-coating a bit -- at least for Python, any function that might return a list could also reasonably return a generator, and might even return
by dilap 15y ago
I think you're sugar-coating a bit -- at least for Python, any function that might return a list could also reasonably return a generator, and might even return a tuple or a set.
I can't speak to common lisp, but I have a fair amount of experience with Python and with the STL (and other stuff, but those two most of all), and I've found the STL to be one of best-designed, most predictable, and easy to use libraries out there. YMMV, of course.
(BTW, an iterator is just a generalization of the concept of a pointer; i.e., a pointer is an iterator.)