On Wed, Oct 17, 2012 at 9:51 AM, Kevin Smith <[email protected]> wrote: > >> Do we log "you need me" only when f is called for the first time? > > > Sorry - that makes no sense. What I meant was: > > module A { > console.log("you need me"); > export var x = "x"; > } > > export function f() { > console.log(A.x); > } > > Do we log "you need me" only when f is called for the first time?
I think that would be far to hard to understand. Instead, we should treat a module with a reference like `A.x` to an unimported module as if it implicitly had an import of `A`, so "you need me" would be logged as soon as the surrounding module was imported, even if `f` is never called. -- sam th [email protected] _______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

