More fun with undefined

Tab Atkins Jr. jackalmage at gmail.com
Thu Jun 14 15:41:17 PDT 2012


On Thu, Jun 14, 2012 at 3:29 PM, Allen Wirfs-Brock
<allen at wirfs-brock.com> wrote:
> This is a different issue, but I wonder how badly the web would break if we
> made undefined a reserved word.  Does anybody in JS really declare a
> different local binding for undefined?  In ES5 we got away with making
> undefined read-only.  Maybe we should continue pushing and see if we can
> eliminate the rebindable undefined hazard.

There are definitely plenty of scripts on the web that *declare*
undefined to shorten the scope look-up, either by using "var
undefined;" or naming an unused argument "undefined".  However, I
would hope that the only cases that actually give it a new value are
those that are being intentionally malicious a la evil.js.

~TJ


More information about the es-discuss mailing list