Module system strawpersons

Andy Chu andy at chubot.org
Mon Jan 18 16:02:09 PST 2010


On Mon, Jan 18, 2010 at 2:24 PM, Kam Kasravi <kamkasravi at yahoo.com> wrote:
> Hi Mike
>
> The former but not in the way you've described. Rather
>
> module A:
> this.getB= function() {
>   return new (import 'B')();
> }
>
> module B:
> this.getA = function() {
>   return new (import 'A')();
> }

In CommonJS, this doesn't seem like a special problem.  The imports
are not executed until the functions are called, so everything is
dandy.  I was referring to this situation:

module A:
import B

B.foo()

module B:
import A

A.bar()

Do the given proposals allow or disallow this?

Andy


More information about the es-discuss mailing list