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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Familiarity Bias Is Holding You Back: It's Time to Embrace Arrow Functions

7 点作者 ericelliott大约 8 年前

2 条评论

powera大约 8 年前
This guy is incredibly sanctimonious, but he misses the biggest problem with his notation. Not all the operators he uses are associative.<p><pre><code> const secret = msg =&gt; () =&gt; msg; </code></pre> This technically parses uniquely, but it&#x27;s not at all obvious what the parse structure is. Writing it with the squiggly brackets makes it clearly parsable.<p><pre><code> const secret = { msg =&gt; { () =&gt; msg } };</code></pre>
评论 #14217752 未加载
Safety1stClyde大约 8 年前
The interesting bit seems to be the &quot;premium content&quot;.