The global object as the "global scope instance object"

Sam Tobin-Hochstadt samth at
Mon Jan 23 06:58:00 PST 2012

On Mon, Jan 23, 2012 at 8:54 AM, Andreas Rossberg <rossberg at> wrote:
> One thing I noticed with your comments is that they consider the
> global scope almost exclusively from the object perspective, i.e., as
> special syntax for putting properties on the global object. But first
> and foremost, it is a scope, so coherent scoping semantics is at least
> as important. If it is incoherent with other scopes, that is
> confusing, and a serious refactoring hazards.

One point about this that came up at the face-to-face meeting:

  Putting properties on the global object is an important use case.
We don't want people to need to reach for |var| when they want to do
this (see t-shirt discussion).  Therefore, we may well need to
compromise some cleanups we might make to the top-level otherwise if
it wasn't for these two constraints.
sam th
samth at

More information about the es-discuss mailing list