Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: "Christoph M. Becker" Newsgroups: comp.lang.javascript Subject: Re: null and NaN Date: Thu, 11 Jun 2015 23:15:11 +0200 Organization: solani.org Lines: 41 Message-ID: References: <1887823.QYRqh1XSJF@PointedEars.de> <6583706.BrqscuLzCi@PointedEars.de> <6931424.mSP66HsXnD@PointedEars.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: solani.org 1434057303 29444 eJwNyNEVwEAEBMCWCLukHEf0X0Luzd/AqOxwgo696iTIgXUzNQS4v3gnSjbXtPdBhXwztOM/FIYRDQ== (11 Jun 2015 21:15:03 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Thu, 11 Jun 2015 21:15:03 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 X-User-ID: eJwNwYEBwCAIA7CXrEDxHQH7/wlbEkaw0xn0UGjjrYPZjnyDqtXGe5KmkcZwk9BRx+/1rQ8Z+RGI In-Reply-To: Cancel-Lock: sha1:DY0WeSoP5XzHTu41xxoYum2FZHc= X-NNTP-Posting-Host: eJwFwQkBACAIA8BK8gwwzkTpH8E7WEh0eiAcgxlpNa9kKncdTlPhtIV9netgTJe8ZrS+uvUBHfERUA== Xref: csiph.com comp.lang.javascript:28088 Joao Rodrigues wrote: > Christoph M. Becker wrote: >> Joao Rodrigues wrote: >> >>> [1] >> >> Brendan Eich wrote: >> >> | We have reason to believe typeof null === “object” is a bug that >> | could bite real content, from our spidering of the web. >> >> So yes, he admits that typeof null === "object" is a bug. However, a >> few lines above it is written: >> >> | From bug fixes where the typeof fixing started, more about the typeof >> | null === “null” fix: >> >> Ah, obviously his comment refers to that. Interestingly, the term "bug >> fixes" is linked to "Bug fixes to ECMA-262". ECMA-262 is a >> specification, not an implementation, so obviously, Brendan Eich >> admitted a *specification* bug. >> >> Contrary to that, Dr. Rauschmeyer claims that typeof null === "object" >> would have been an *implementation* bug in the first version of JavaScript. > > IMO, Dr. Rauschmeyer is right when using "implementation" instead of > "specification" bug because he analyses a code excerpt from the first > version of JavaScript which was released by the end of 1995, while > Netscape took JS to Ecma in November 1996 (one year later), and the > first edition of ECMAScript was released on June 1997. Well, let's agree to disagree. :) Actually, I don't mind whether Dr. Rauschmeyer is right in this case, and whether this is a bug at all. Most importantly, it (typeof null === "object") is a behavior one has to be aware of. -- Christoph M. Becker