Modules: Name capture

Waldemar Horwat waldemar at google.com
Wed Jun 2 15:19:10 PDT 2010


ihab.awad at gmail.com wrote:
> 
> On Tue, Jun 1, 2010 at 6:26 PM, Waldemar Horwat <waldemar at google.com 
> <mailto:waldemar at google.com>> wrote:
> 
>     I don't understand your example of how this is supposed to work in
>     the regular (non-accidental-aliasing) case.  As you wrote in your
>     example, two.js evolves to reference the identifier "Drawing"
>     unbeknownst to one.js.  There is no definition of it, so two.js
>     wouldn't work at all.
> 
> 
> [ I hope I understand your question. ]
> 
> In my original example, "zero.js" defined "Drawing". According to the 
> current proposal, this would be propagated down to "two.js".
> 
> Does that help?

No.  In one sentence you wrote that two.js changed to require its invoker to provide a Drawing API; in another you wrote that two.js did not tell its invoker, one.js, to provide a Drawing API.  The combination of the two is meaningless.

    Waldemar


More information about the es-discuss mailing list