3 ms·
I never understood the complaint about generators. Languages can have both light-weight laziness (like generators) and more heavy abstractions (like scheme's sr
by bjoli 6y ago
I never understood the complaint about generators. Languages can have both light-weight laziness (like generators) and more heavy abstractions (like scheme's srfi-41). The overhead of generators in, say, JavaScript is minimal. If you want odd lazy lists, generators is a great thing to use to build it. Generators and streams (as in scheme's SRFI 41) are not mutually exclusive.