Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #28088

Re: null and NaN

From "Christoph M. Becker" <cmbecker69@arcor.de>
Newsgroups comp.lang.javascript
Subject Re: null and NaN
Date 2015-06-11 23:15 +0200
Organization solani.org
Message-ID <mlcton$so4$2@solani.org> (permalink)
References (7 earlier) <mlc0s1$9tt$1@speranza.aioe.org> <mlc2d0$o3i$1@solani.org> <mlc6a4$nr4$1@speranza.aioe.org> <mlcm9v$1u2$1@solani.org> <mlcr34$drd$1@speranza.aioe.org>

Show all headers | View raw


Joao Rodrigues wrote:

> Christoph M. Becker wrote:
>> Joao Rodrigues wrote:
>>
>>> [1] <http://wiki.ecmascript.org/doku.php?id=discussion:typeof>
>>
>> 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

Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

Re: null and NaN Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-06-05 00:55 -0300
  Re: null and NaN Robert Heller <heller@deepsoft.com> - 2015-06-05 06:57 -0500
    Re: null and NaN Steven D'Aprano <steve@pearwood.info> - 2015-06-07 18:47 +1000
  Re: null and NaN Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-06 08:39 +0200
    Re: null and NaN Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-06-06 23:15 -0300
      Re: null and NaN Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-07 09:59 +0200
        Re: null and NaN Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-06-07 22:30 -0300
          Re: null and NaN Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-06-10 20:48 +0200
            Re: null and NaN Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-06-11 10:01 -0300
              Re: null and NaN "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-06-11 15:28 +0200
                Re: null and NaN Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-06-11 11:34 -0300
                Re: null and NaN "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-06-11 21:07 +0200
                Re: null and NaN Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-06-11 17:29 -0300
                Re: null and NaN "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-06-11 23:15 +0200

csiph-web