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.

Forget about promises, use harvests

3 pointsby abssover 11 years ago
Harvests: From now is possible to call asynchronous functions in a declarative way and to get almost the same experience as with synchronous code. https://github.com/salboaie/harvests

1 comment

abssover 11 years ago
<a href="https://github.com/salboaie/harvests" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;salboaie&#x2F;harvests</a><p>harvest.let(&#x27;father&#x27;, loadPenguin, &#x27;MrPenguin&#x27;); harvest.let(&#x27;mother&#x27;, loadPenguin, &#x27;MrsPenguin&#x27;); harvest.let(&#x27;family&#x27;, loadPenguinFamily, wait(&#x27;father&#x27;), wait(&#x27;mother&#x27;));<p>The above call do 3 calls without then or declaring ugly callbacks!