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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

“I Don't Hate Arrow Functions” Blog Post

4 点作者 _getify大约 6 年前

2 条评论

z3t4大约 6 年前
with async/await you can write very terse arrow functions. If you don't care about error handling, readability, or comprehension. I only use arrow functions when running stuff in the repl, debug console, or in chat messages. In all production code I use named functions. Actually I don't use any ES6+ in production code, because I'm targeting more then just the mainstream browsers. Although I'm looking forward to use some of it if JS engines are able to catch up to the ECMA, and people stop using old browsers. I don't think adding a compilation step is worth it, besides optimizing script size and loading time. Not all engines support source maps, some doesn't even give a stack trace. Then good luck debugging.
_getify大约 6 年前
(self post)