TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

How to Use Generators – batching, cancellation, pause/resume

7 pointsby bloomcaover 7 years ago

1 comment

oldandtiredover 7 years ago
I find it interesting that the concepts of generators being added to languages after the fact (that is not a fundamental part of the language) leads to such complex difficulties in their use.<p>Icon and UnIcon are examples where generators and co-expressions are fundamental to the language and so are used throughout most of your programs as a natural part of writing solutions to the problems being solved.<p>I find it interesting that iterators are such a big thing when they are just generators in Icon&#x2F;UnIcon. I have seen many examples written in JS where map and lambda functions are used and the equivalent in Icon&#x2F;UnIcon is a simple generator to get the same results.<p>Icon has been around since the early 80&#x27;s (as the successor of SNOBOL4) and UnIcon as a separate project since around 2000. I should remark that the UnIcon translates UnIcon programs to Icon.<p>Goes to show that there is still much life in some of these older languages.