TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The history of “typeof null” (2013)

57 pointsby abdnafeesover 2 years ago

3 comments

conaclosover 2 years ago
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 未加载
bryanrasmussenover 2 years ago
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 未加载
abdnafeesover 2 years ago
Why even? Why don&#x27;t they fix it?
评论 #34704823 未加载
评论 #34704811 未加载
评论 #34714499 未加载
评论 #34706842 未加载
评论 #34704892 未加载
评论 #34704887 未加载