module exports
John Barton
johnjbarton at google.com
Fri Mar 14 07:35:59 PDT 2014
What is a 'mutable binding'?
On Fri, Mar 14, 2014 at 7:30 AM, Domenic Denicola <
domenic at domenicdenicola.com> wrote:
> Importing is nothing like destructuring. You import mutable bindings;
> you don't do assignment. I'm very glad that different syntax is used for
> each case.
>
> ------------------------------
> *From:* Mark Volkmann <r.mark.volkmann at gmail.com>
> *Sent:* Friday, March 14, 2014 10:19
> *To:* Kevin Smith
> *Cc:* Domenic Denicola; es-discuss at mozilla.org
> *Subject:* Re: module exports
>
> I understand it's hard to make changes after a certain point. It's too
> bad though that developers will have to remember that the way to import a
> few things from a module is:
>
> import {foo, bar} from 'somewhere';
>
> but the way to import the whole module is:
>
> module SomeModule from 'somewhere';
>
> instead of
>
> import SomeModule from 'somewhere';
>
> It just seems so clean to say that if you want to import something, you
> always use the "import" keyword.
>
>
> On Fri, Mar 14, 2014 at 9:12 AM, Kevin Smith <zenparsing at gmail.com> wrote:
>
>> export { foo as default };
>>>>
>>>> I fail to see why sugar over this form is necessary.
>>>>
>>>
>>> I completely agree. Plus if this is taken away then the "import"
>>> keyword can be used to get the whole module as in my example above. At that
>>> point maybe there is no need for the "module" keyword.
>>>
>>
>> Maybe, but at this point that would be too big of a change to swallow.
>> I think if we can just focus on eliminating this one pointless and
>> confusing aspect (the export default [expr] form), we'll be good to go.
>>
>>
>>
>
>
> --
> R. Mark Volkmann
> Object Computing, Inc.
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140314/1f77fd76/attachment-0001.html>
More information about the es-discuss
mailing list