News for hackers. Stuff that matters.
Re:JavaScript - "typeof" operator & null by krisk on Friday June 22, 2012 @03:11AM (#4145799)
"I think it's only bad because it would break with future changes to typeof"

You're completely right.

The proposal (http://wiki.ecmascript.org/doku.php?id=proposals:typeof) suggests the change of typeof null to actually return "null"; however, as Douglas Crockford points out, "existing code cannot anticipate the change". Additionally, Brendan Eich states that "neither this proposal nor the bug fixes in that proposal are backward-compatible".

There are no comments on this comment yet.