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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: Why is Node.js Streams so underused?

3 点作者 GoodbyeEarl将近 8 年前

1 comment

pfraze将近 8 年前
I&#x27;m not quite sure they are underused, but that&#x27;s a relative judgment. Streams took a while to get right in node, and even now they&#x27;re a <i>little bit</i> clunky. Not terrible, but not &quot;pick it right up and run with it&quot; easy. (If you want to use them, you probably should look at Mississippi <a href="https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;mississippi" rel="nofollow">https:&#x2F;&#x2F;www.npmjs.com&#x2F;package&#x2F;mississippi</a> because that simplifies a lot of common tasks.)<p>AFAICT there used to be more energy in the community for them. Gulp.js was conceived as more powerful build pipeline that used streams (<a href="https:&#x2F;&#x2F;github.com&#x2F;gulpjs&#x2F;gulp" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;gulpjs&#x2F;gulp</a>), and that&#x27;s the last time I remember anybody getting psyched about streams as &quot;more elegant&quot; than a nonstream version (in that case, Grunt).<p>Now, I think people tend to reach for streams when there&#x27;s a performance-based reason for it, since streams can do things like faster time-to-first-byte, and less memory overhead.