Comment to one of my blog posts. 🙄 It’s reasonable to argue that null *is* an object, but the elaborate insults are not OK. As an aside, Brendan Eich agrees that typeof null is a bug. Details on typeof null: https://2ality.com/2013/10/typ...
@IndieScripter @rauschma JS was supposed to interconnect with Java, including object refs that could be null. Blame Java, yet again.
@BrendanEich @IndieScripter Interesting. So, at the time, it was a deliberate decision, not something that happened accidentally(?)
@BrendanEich @IndieScripter Right! How you describe motivation for `null`: – typeof null === 'object' makes sense and was not an accident, but intentional (“mistake”, not “bug”). – Later, with the disjoint types Null and Object in the ECMAScript spec, typeof null didn’t make sense anymore.
@rauschma @IndieScripter null predates typeof, which came later, 1996, with Java interop thanks to Nick Thompson’s work on LiveConnect in Netscape 3. I say typeof null == “object” was a mistake because code that condition guards must null-test before dereferencing. But in Java, object types are nullable.
@rauschma @IndieScripter So as with the chronology of the things themselves, the motivation for null predates the motivation for typeof. That’s why I’m talking about null and its presence in Java. Java was to be the big brother language to JS.
@rauschma @IndieScripter If I didn't have "Make it look like Java" as an order from management, *and* I had more time (hard to unconfound these two causal factors), then I would have preferred a Self-like "everything's an object" approach: no Boolean, Number, String wrappers. No undefined and null. Sigh.
@BrendanEich @IndieScripter Thanks Brendan!

