3 ms·
How absent is generator support in languages in general? As far as I know, even PHP has had yield for something like a decade, and JS for longer (at least as fa
by wwweston 5y ago
How absent is generator support in languages in general? As far as I know, even PHP has had yield for something like a decade, and JS for longer (at least as far back as 2006, when Yield Prolog got discussed on LTU[0]). Or is there something about the Python approach to generators that's distinctive?
[0] http://lambda-the-ultimate.org/node/1732 http://lambda-the-ultimate.org/node/1732
- tobr 5y agoThe Ecmascript 4 proposal included the `yield` keyword, but the proposal as a whole was abandoned in 2008. That’s why the version names jump from ES3 to ES5. Some of the features then returned in later versions, including generators with ES6 in 2015.
- BiteCode_dev 5y agoLanguage tends to converge on good features, luckily. Although some generator implementations are not as complete as python ones, and the ecosystem generally donc have much support for it E.g : Very few languages have an equivalent to itertools.