Module system strawpersons

Mike Samuel mikesamuel at gmail.com
Thu Jan 14 13:29:20 PST 2010


2010/1/14  <ihab.awad at gmail.com>:
> Hi folks,
>
> Kris Kowal and I have written up our proposals for a module system, to
> be discussed during the Jan 28-29 meeting. The proposals are as
> follows:

I skimmed it and came up with a few questions that might make it
easier to read in depth if answered.

Are these proposals mutually exclusive or complementary.
If (1) and (2) are exclusive, is there a place to collect use cases
for a module-off?

I don't see the word module anywhere in the packages proposal besides footnotes.
What is the relationship between packages and modules.

> 1. http://wiki.ecmascript.org/doku.php?id=strawman:modules_primordials
>
>      Module proposal, by Kris, focusing on management of primordials.

Maybe mention in the Context definition that Context is invokable as a
constructor.
Is the global instanceof global.Context?
In the grammar for ImportWith, can id be replaced with the object
literal production from the native JSON portion of the spec?
Can Import and ImportWith only appear in a module function body?  If
not, where are the semantics of ImportWIth and Import specified?
In Module, when you say "load clause", does that bear any relationship
to the load_opt parameter?

> 2. http://wiki.ecmascript.org/doku.php?id=strawman:modules_emaker_style
>
>      Module proposal, by Ihab, focusing on EMaker-style invocation semantics.

"First class objects. To the extent possible, module system components
must be represented as first-class ECMAScript objects."
Does object exclude primitives such as strings, or is the goal to
exclude abstractions like LexicalScopes and References?

"import" is added to the reserved keyword list?

"return {
 getX: function() { return x; },
  getY: function() { return y; },"
indentation

"In the module’s code, this is initialized to a new object that is
instanceof the module function"
Does this mean that access to a module instance conveys authority to
create new module instances?

"An import expression evaluates immediately to a module function
despite the fact that the specified module may have been fetched by
asynchronous means (e.g., nonblocking network operations). This is
done by taking advantage of the fact that import is a special form."
Does this require "import" to be a special form instead of a
desugaring?  Or can the special form be boiled down to a function
which when called, delays until another function is invoked,
presumably with a valid FunctionExpr string as its sole argument?



> 3. http://wiki.ecmascript.org/doku.php?id=strawman:modules_packages
>
>      Packages proposal, by Ihab, focusing on how code may be
> identified and distributed.
>
> Ihab
>
> --
> Ihab A.B. Awad, Palo Alto, CA
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>


More information about the es-discuss mailing list