Global lexical tier
allen at wirfs-brock.com
Tue Sep 1 18:39:08 UTC 2015
On Sep 1, 2015, at 11:04 AM, Geoffrey Garen wrote:
>> The possible semantics of global lexical declarations was extensively explored by TC39 before we make the final design decisions for ES6. The scoping of global lexical declarations is something we spent many hours discussing over a span of several years, including:
> To be fair, some problems in design only become apparent after implementation and use.
> For example, in the case of global lexical scope, implementing and testing the details of the current ECMAScript specification led Saam to conclude — and led me to agree — that the behavior was strange, and hard to reason about.
> I hope you aren’t saying that ECMAScript decisions should become permanent and irreversible prior to any implementation or adoption effort. In other web standards, implementation and adoption guide specification — to the benefit of the specification.
What I'm saying is that this is more about "requirements" than implementations. There was a complex (and sometimes conflicting) set of requirements for the semantics of the new global declarations. The final design that TC39 accepted threaded the needle among those requirements. We were aware that some people (including some TC39 members) would probably find some aspects of the design might be strange or quirky. However, that tends to be the nature of solutions when dealing with complex requirements.
Suggestions to change the design needs to address how each of those requirements can still met or why some of the requirements are not longer relevant. Evidence that the design is impossible to implement would be important news. But I don't think anybody has yet made that assertion. Observations that it is strange is less useful. So are alternative designs that are presented without consideration of all of the initial requirements.
More information about the es-discuss