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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Ask HN: Thoughts on Flow

3 点作者 noshbrinken将近 8 年前
I spent the last week using Flow at work. This is the first static type system I've used. It was much more challenging than expected and yielded no (perceptible) practical benefit. I lost a day trying to resolve Flow errors in seemingly simple code. The error messages are cryptic and sometimes the stack traces are misleading. Is this generally the experience with static type systems? Static typing appeals to me and I really want to like/get it. But after a week, Flow has left me feeling defeated.

1 comment

schwabacher将近 8 年前
The learning curve is steep if you are not familiar w&#x2F; static typing, and its not unheard of to run into bugs in flow itself, but overall I have found it to be really helpful.<p>In my experience it pays off best in refactors - in projects w&#x2F; good flow types I have been able to make big changes to my code, fix flow errors, and then have tests pass on the first run.<p>It&#x27;s also great when working on code that others wrote - the type annotations are about the same amount of boilerplate as something like jsdoc, but having them checked automatically in my editor saves a lot of context switching between files.