Remarks about module import

Peter Michaux petermichaux at gmail.com
Sat Aug 23 15:40:05 PDT 2008


I'm a bit late to this module party...

On Tue, Aug 19, 2008 at 1:00 AM, Ingvar von Schoultz
<ingvar-v-s at comhem.se> wrote:

>  From the descriptions it looks like this could instead use
> a syntax based on destructuring assignment, if es-harmony
> will have destructuring:
>
>     var {toggle: t, set: s} = import
>     (   fetchModule ('http://foo.com/someModule.js'),

Are "module" and "file" synonymous? See

http://dev.helma.org/wiki/Modules+and+Scopes+in+Helma+NG/

What do the contents of the http://foo.com/someModule.js file look like?

fetchModule would need to work with the local file system for server-side work.

What exactly does fetchModule return? Some kind of first-class Module
class instance or is it returning the object which is being
destructured?

>         {document: doc, background: bg}

What does this argument to import do?

>     );
>     t();

[snip]

Peter


More information about the Es-discuss mailing list