TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Paving the way for the new Node.js

56 点作者 neumino超过 11 年前

6 条评论

bilalq超过 11 年前
A pity the title doesn&#x27;t mention rethinkdb at all. A new driver with generator support is very exciting news.<p>By the way, for those that are interested, here&#x27;s a link you can use to learn&#x2F;understand how generators can help with async control flow: <a href="http://blogs.atlassian.com/2013/11/harmony-generators-and-promises-for-node-js-async-fun-and-profit/" rel="nofollow">http:&#x2F;&#x2F;blogs.atlassian.com&#x2F;2013&#x2F;11&#x2F;harmony-generators-and-pr...</a>
NathanKP超过 11 年前
I&#x27;ve come to be a big fan of async.auto which allows me to break a large task down into smaller functional steps, define their required dependencies on each other, and then just let async take care of the magic of executing the operations in the correct order, and parallelizing operations when possible.<p>Do any of you promise and&#x2F;or generator users know of a good equivalent to async.auto?<p>I feel like promises and generators have potential but much of my code is based on async.auto and I feel like it would be complicated and painful to try to rewrite that with promises and generators.
评论 #7147498 未加载
hippipp超过 11 年前
In the event that you find yourself wondering how these newfangled generators (used by the rethinkdash driver) work, see the following:<p><a href="http://blog.carbonfive.com/2013/12/01/hanging-up-on-callbacks-generators-in-ecmascript-6/" rel="nofollow">http:&#x2F;&#x2F;blog.carbonfive.com&#x2F;2013&#x2F;12&#x2F;01&#x2F;hanging-up-on-callback...</a>
orf超过 11 年前
For anyone using Python who likes the look of this Twisted supports exactly this using their (rather awesome) inlineCallbacks decorator.
评论 #7146828 未加载
sdegutis超过 11 年前
Serious question: What is the benefit of Node.js over other server-side platforms? Is it just because client-side developers are already familiar with JavaScript?
评论 #7147187 未加载
评论 #7146873 未加载
评论 #7147120 未加载
评论 #7148363 未加载
评论 #7147443 未加载
评论 #7146794 未加载
评论 #7146784 未加载
评论 #7147114 未加载
评论 #7147581 未加载
评论 #7150585 未加载
评论 #7147168 未加载
heydenberk超过 11 年前
&gt;&gt; Now look how wonderful the code looks with new driver.<p>Yikes. That is not so wonderful looking. But yeah, it&#x27;s better than callback hell.