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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

The history of “typeof null” (2013)

57 点作者 abdnafees超过 2 年前

3 条评论

conaclos超过 2 年前
I could like to have a kind of rust edition for JavaScript.<p>You could opt in to an edition by adding a JavaScript directive at the start of the file — like the &quot;use strict&quot; directive. e.g.<p><pre><code> ```js &quot;use edition2023&quot; ``` </code></pre> This could enable to remove obsolete features and improve strictness.<p>EDIT: I forgot the &quot;use&quot; before &quot;strict&quot;.
评论 #34706260 未加载
评论 #34717557 未加载
评论 #34709998 未加载
评论 #34706188 未加载
评论 #34706053 未加载
bryanrasmussen超过 2 年前
I don&#x27;t know that I buy the would break existing code - sure the language would change but do we actually have stats of uses where we can see people did.. what would they have done?<p>if (typeof varname === &quot;object&quot; &amp;&amp; !varname) { loggingNull(&quot;varname&quot;); }<p>it seems far fetched and maybe those people&#x27;s code should break.<p>I guess it doesn&#x27;t really affect me though.
评论 #34705867 未加载
评论 #34706083 未加载
评论 #34706894 未加载
abdnafees超过 2 年前
Why even? Why don&#x27;t they fix it?
评论 #34704823 未加载
评论 #34704811 未加载
评论 #34714499 未加载
评论 #34706842 未加载
评论 #34704892 未加载
评论 #34704887 未加载