Thanks for the link! That means that `import` is already on the borderline of the spec since it wants to be a function and object. `module` would eliminate all confusion and restriction but as you said, only if passing it around must be expressly disallowed - need an interested TC39 member to weigh in
On Sat, 5 Aug 2017 at 18:40 T.J. Crowder <[email protected]> wrote: > On Sat, Aug 5, 2017 at 1:46 PM, Naveen Chawla > <[email protected]> wrote: > > > > I think it has to be an identifier, especially given proposals > > like `meta`, dynamic functionality etc. > > There's a slight misunderstanding here about the term "identifier" that > may be preventing your fully understanding what I'm saying. `import` isn't, > and cannot be, an identifier, because it's a keyword. See the [Identifiers > section][1] of the spec. This is the fundamental difference between > `import` and `document` (or perhaps more properly [since `document` isn't a > JavaScript thing], between `import` and, say, `undefined` or `Symbol`). > Understanding the difference between an identifier and a keyword may help > you understand better what I'm saying regarding why `module` *as an > identifier* might be a problem. > > I'll leave the question of whether passing that identifier's value around > would be a problem to people more familiar with the complexities of the > import mechanisms. As I've said several times now: I *suspect* it's a > problem, I don't *know* that it is. > > -- T.J. Crowder > > [1]: > http://www.ecma-international.org/ecma-262/8.0/index.html#sec-identifiers > >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

