Modules, Concatenation, and Better Solutions

Brendan Eich brendan at mozilla.org
Wed Oct 17 08:35:03 PDT 2012


Kevin Smith 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?

Yes, that's what I took from Dave's description of (b). Laziness + side 
effects, FTW?

/be


More information about the es-discuss mailing list