Module system strawpersons

Dean Landolt dean at
Mon Jan 18 13:54:34 PST 2010

On Mon, Jan 18, 2010 at 4:27 PM, Kam Kasravi <kamkasravi at> wrote:

> Andy
> yes I was referring to the circular dependency issue.
> Catch-alls would be useful for this, though it would be nice if
> they were automated, eg returning a proxy until the module was used.
> Doing it manually by developer would be too difficult.
> I realize modules are intended to just satisfy a function body and
> can be initialized as objects or called as functions, but since they
> have strong container semantics I wonder if they should
> have more than just an 'id' especially if they provide a gateway
> to what else is in the directory as in commonjs.

Can you clarify what you mean by "provide a gateway"? AFAIK the only gateway
a commonjs module provides is that which is explicitly added its exports
object, which can be required modules from anywhere in require.paths. Also,
in the context of commonjs SecurableModules, as the spec stands, modules *
cannot* be called as functions. However if Harmony were to bless a module
system (or at least a means to create module systems) it would be wonderful
if this oft-requested feature would be considered.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list