On Fri, Jun 27, 2014 at 3:52 AM, Michał Gołębiowski <m.go...@gmail.com>
wrote:

> On Fri, Jun 27, 2014 at 9:44 AM, Russell Leggett <
> russell.legg...@gmail.com> wrote:
>>
>> No, that example would be:
>>
>>     import "mkdirp" as mkdir;
>>
>> Its actually shorter than node.
>>
>
> But in current proposal the module object cannot be a function from what I
> understand. So you'd have to create a named export and import it as I wrote.
>
>
Ok, so can I just ask a serious question. I looked at the mkdirp library,
and in their own documentation, they use:

    var mkdirp = require('mkdirp');
So let's say in the new world order, no default exports, this is a named
export mkdirp. Is it *really* that bad a thing to just use the name they
chose for their API? I mean what about all of the likely cases of exporting
a class. Would you advocate for those classes to be aliased before use?
What about methods? Those are typically unchanged. The argument has been
made that without default exports, library users would then have to known
the name of the exported member. Is that really a serious complaint? You
*have* to know what everything else is called, what parameters are
expected, etc. I would go as far as to say that either 1 of 2 things is
happening.
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to