by ReflectedImage · 3y ago · 0 comments
You would be better off using dynamic typing and returning an Iterator.
The dynamic typing route of a small number of language defined types is far better than any developer declaring their own types whenever they want.
Why? Because it's simpler and simpler code is faster to write and easier to test.
The point is that most of the time I wouldn't know it's returning an Iterator, because it's poorly or not document. At least that is my experience.
Anyway, I was only speaking for myself. And my personal experience is exactly the opposite: I'm far less productive in dynamic languages when working on any non-trivial codebase, for the reasons I stated.