On Jun 19, 2014, at 13:36 , Michał Gołębiowski <[email protected]> wrote:

> On Thu, Jun 19, 2014 at 12:40 PM, Axel Rauschmayer <[email protected]> wrote:
> This is a key sentence in David’s proposal: “ES6 favors the single/default 
> export style, and gives the sweetest syntax to importing the default. 
> Importing named exports can and even should be slightly less concise.”
> 
> There are a lot of large modules that will not disappear overnight. I assume 
> ES6's recommendation for such things (Node's fs module, Lo-Dash) is to make 
> those container objects default exports?

What are you saying? That you find this syntax too verbose?

```js
import * as fs from "fs";
```

There is a little more clutter, but it’s only 2 characters longer than:

```js
var fs = require('fs');
```

This design decision does make sense if single-export modules are indeed much 
more common. It’s not what I expected, but it does seem to be the case.

-- 
Dr. Axel Rauschmayer
[email protected]
rauschma.de



_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to