Minor questions on new module BNF

David Herman dherman at mozilla.com
Mon Jun 3 15:13:11 PDT 2013

On Jun 3, 2013, at 9:33 AM, Yehuda Katz <wycats at gmail.com> wrote:

> On Mon, Jun 3, 2013 at 12:24 AM, Domenic Denicola <domenic at domenicdenicola.com> wrote:
> From: samth0 at gmail.com [mailto:samth0 at gmail.com] On Behalf Of Sam Tobin-Hochstadt
> > I would just write `import {} from "someModule";`
> That appears to be disallowed; I believe
>     "{" ImportSpecifier ("," ImportSpecifier)* ","? "}"
> requires at least one `ImportSpecifier`.

Oversight. Fixed.

> (It's also sad and ugly; any reason not to allow `import "someModule";`?)
> I've advocated for this in the past. I believe it should be allowed.

I've always liked this too, and just hadn't really gotten to it. But I've added it to the wiki page too. I'll work with Jason to add this to the reference library; it should be a small addition.

> Separately, I would like this form to be specified as deferring execution until bindings are explicitly imported (from another module), or a synchronous `System.get` call is made.
> This would make it possible to guarantee that a synchronous `System.get` will succeed, without being forced to execute the module first.

Yep, agreed. (To be pedantic, it's not that it defers execution so much as that it doesn't force execution.)


More information about the es-discuss mailing list