Remarks about module import

ihab.awad at ihab.awad at
Mon Aug 18 17:25:13 PDT 2008

On Mon, Aug 18, 2008 at 5:17 PM, Brendan Eich <brendan at> wrote:
> On Aug 18, 2008, at 5:02 PM, ihab.awad at wrote:
>> That said, we in Caja land have worried about
>> whether *some* default global properties should be made available --
> Why couldn't they be imported from a standard module? Must everything be
> passed down? Maybe in Caja, but I don't see that as a requirement on
> successor ES standards.

Even in Caja, it's possible for one module to import another. What
needs to be passed down is *authority*, not the ability to execute

But ok, yes, if people like the idea of using an "importModule"
construct to get the "Function" and "Number" objects, say, then sure,
that's a great solution.

What it means essentially is that the "importModule" construct, plus
some "fetchModule" service that knows where to find the primordial
objects, together constitute the material provided to a module by
default. If this can be made to work cleanly while allowing
user-supplied "fetchModule" implementations that get module code from
(say) a database or whatever, then that's peachy.


Ihab A.B. Awad, Palo Alto, CA

More information about the Es-discuss mailing list