W3C home > Mailing lists > Public > public-script-coord@w3.org > January to March 2015

Re: Global method calls

From: Brendan Eich <brendan@mozilla.org>
Date: Sun, 22 Feb 2015 14:44:53 -0800
Message-ID: <54EA5BE5.3070007@mozilla.org>
To: Mark Miller <erights@gmail.com>
CC: Domenic Denicola <d@domenic.me>, "public-script-coord@w3.org" <public-script-coord@w3.org>, "es-discuss@mozilla.org" <es-discuss@mozilla.org>
Mark Miller wrote:
> There, Boris writes:
> > Conceptually, using the global of the realm of the function involved
> > (i.e. the Chrome/Firefox/IE10 behavior) makes sense to me.
> Me too. This is in keeping with the spirit of lexical scoping. It is 
> as if these built-in functions have lexically captured the global of 
> the realm of their creation, and use that. Besides "throw", any other 
> answer would be too much magic and (at least) hard to explain. Also, 
> this aligns with the global capture of sloppy functions.

This is how it was back in the beginning. Function objects each had a 
"parent" internal slot referencing their global.

Received on Sunday, 22 February 2015 22:45:27 UTC

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