On Jan 3, 2012, at 1:29 AM, Andreas Rossberg wrote:

> On 3 January 2012 07:21, Brendan Eich <bren...@mozilla.com> wrote:
>> It's not obvious if the static scope is built up from <sript> element to 
>> successive <script> element, either. Must I read all the scripts? The 
>> conditionally generated ones too?
>> 
>> The top level is hard. The only way to be sure is to use pure lexical scope 
>> (in Dave's proposal, use module {...}).
> 
> Ah, but wrapping into modules is incompatible with having multiple
> script parts.

I don't know what you mean. "Incompatible" in the sense that you cannot 
transform multiple scripts into multiple anonymous modules?


> For multi-part scripts we need a way to switch the
> _proper_ top-level into extended mode. Or should I not be able to
> write (the relevant bits of) a multi-part script in extended mode at
> all?

The proposal may have been unclear on this point: the top level would allow as 
much new syntax and semantics as can be tolerated backwards-compatibly. The 
hard cases are let, lexical scope in the free-variables-are-errors sense Dave 
described (extant globals at start of module body are imported), and any 
runtime shifts we want (completion reform, typeof null).

/be
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to