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.

Computing with JavaScript's Undefined (2020)

51 pointsby notagoodideaabout 1 year ago

6 comments

DesertVarnishabout 1 year ago
Unavailable at the moment (HN hug of death?), Wayback Machine: <a href="https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20240204131916&#x2F;https:&#x2F;&#x2F;esoteric.codes&#x2F;blog&#x2F;calculating-with-jss-undefined" rel="nofollow">https:&#x2F;&#x2F;web.archive.org&#x2F;web&#x2F;20240204131916&#x2F;https:&#x2F;&#x2F;esoteric....</a>
评论 #39824875 未加载
评论 #39819428 未加载
DonHopkinsabout 1 year ago
<a href="https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Tony_Hoare#Research_and_career" rel="nofollow">https:&#x2F;&#x2F;en.wikipedia.org&#x2F;wiki&#x2F;Tony_Hoare#Research_and_career</a><p>&gt;Speaking at a software conference in 2009, Tony Hoare apologized for inventing the null reference:<p>&gt;&quot;I call it my billion-dollar mistake. It was the invention of the null reference in 1965. At that time, I was designing the first comprehensive type system for references in an object oriented language (ALGOL W). My goal was to ensure that all use of references should be absolutely safe, with checking performed automatically by the compiler. But I couldn&#x27;t resist the temptation to put in a null reference, simply because it was so easy to implement. This has led to innumerable errors, vulnerabilities, and system crashes, which have probably caused a billion dollars of pain and damage in the last forty years.&quot; -Tony Hoare<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=19568378">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=19568378</a><p>&gt;&quot;My favorite is always the Billion-Dollar Mistake of having null in the language. And since JavaScript has both null and undefined, it&#x27;s the Two-Billion-Dollar Mistake.&quot; -Anders Hejlsberg<p>&gt;&quot;It is by far the most problematic part of language design. And it&#x27;s a single value that -- ha ha ha ha -- that if only that wasn&#x27;t there, imagine all the problems we wouldn&#x27;t have, right? If type systems were designed that way. And some type systems are, and some type systems are getting there, but boy, trying to retrofit that on top of a type system that has null in the first place is quite an undertaking.&quot; -Anders Hejlsberg
评论 #39830275 未加载
评论 #39871449 未加载
maxcoder4about 1 year ago
As the author mentioned, JSFuck uses a very similar mechanism.
评论 #39827092 未加载
eimrineabout 1 year ago
It reminds me the earliest implementations of Lisp where numbers have considered as lists of certain length.
评论 #39825837 未加载
评论 #39836787 未加载
ivanjermakovabout 1 year ago
Reminds me of Tom 7&#x27;s NaN computer: <a href="http:&#x2F;&#x2F;tom7.org&#x2F;nand&#x2F;" rel="nofollow">http:&#x2F;&#x2F;tom7.org&#x2F;nand&#x2F;</a>
评论 #39830186 未加载
pavi2410about 1 year ago
This could be used for a really good obfuscation.
评论 #39825772 未加载
评论 #39825641 未加载