W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2012

Re: "var" declarations shadowing properties from Window.prototype

From: Allen Wirfs-Brock <allen@wirfs-brock.com>
Date: Sat, 11 Aug 2012 10:01:09 -0700
Cc: Boris Zbarsky <bzbarsky@MIT.EDU>, public-script-coord@w3.org, es-discuss@mozilla.org
Message-Id: <054F12E9-4A11-413E-9959-B56DB07521F7@wirfs-brock.com>
To: Brendan Eich <brendan@mozilla.org>

On Aug 10, 2012, at 11:14 PM, Brendan Eich wrote:

> Allen Wirfs-Brock wrote:
>> I don't think there is anything special about the global named undefined.  As long as it is a own property of the global object  (which is is spec'ed to be) 'var undefined' is fine because redundant var declarations don't do anything anything.  If undefined was inherited from window.prototype it would be a different story.
> Agreed, just noting that const x = 42; var x; is not tolerated in ES6 as proposed (right?).

Received on Saturday, 11 August 2012 17:01:39 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:07 UTC