erik: I'd be interested in learning the outcome of the normalization
discussion.  As one of the maintainers of es6-shim I'm particularly
interested in ways to access ES6 features with ES5 syntax.  If that
looks like:

```js
 this['default'] = Promise.join(System.import('foo'),
System.import('bar')).spread(function(foo, bar) {
      ....
      return { ... exports ... };
});
```

I can live with that.  Any chance that we will accept and unwrap a
promise for the exported value?  (Not that it really matters for the
above, since Promise.join will do recursive unwrapping, but it would
be nice for compatibility if this were transparent in general.)

john: yes, I suspected that System was underspecified.  That's too bad.
  --scott

On Fri, Feb 14, 2014 at 9:57 AM, Erik Arvidsson
<erik.arvids...@gmail.com> wrote:
> On Fri Feb 14 2014 at 2:20:07 PM, C. Scott Ananian <ecmascr...@cscott.net>
> wrote:
>>
>> Thanks. I was missing the relationship between System and Loader somehow.
>>
>> So System.import is intended to be exactly the same as the import keyword
>> (except promise-returning).
>
> There is a big difference here. The syntax for import normalizes the name
> and then resolves the name relative to the current module. System.import
> only takes an already normalized name relative to the baseURL. So, you need
> to do the normalization and resolviong manually first. There was a proposal
> to have import do the normalizing and also take an optional referrerName.
> I'm afraid I don't remember what the outcome of that was.
>
>>
>> That's good!  Is there a way to do without the export keyword as well
>> (I've heard rumors of "anonymous exports" but haven't named to track down a
>> spec)?
>
> There is a default export. It is just syntactic sugar over exporting and
> importing something with the name `default`.
>
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to