Single import from modules without default export

Matthew Robb matthewwrobb at gmail.com
Wed Aug 6 06:07:10 PDT 2014


​What if we just added a way to import based on index:

​import [a,b,c] from "d";​
>


- Matthew Robb


On Wed, Aug 6, 2014 at 8:52 AM, Mark Volkmann <r.mark.volkmann at gmail.com>
wrote:

> +1 to Kevin's suggestions.
>
> ---
> R. Mark Volkmann
> Object Computing, Inc.
>
> On Aug 6, 2014, at 7:10 AM, Kevin Smith <zenparsing at gmail.com> wrote:
>
>
>> Completely agree, the default should be removed. This is simply a
>> proposal of how we can still have a simple import statement (`import $ from
>> "jQuery";`) without needing `default`.
>>
>>
> You know, I hate even suggesting any syntax changes at this point, but if
> we ditched the whole "default" thing, we could probably also get rid of the
> curlies:
>
>     import readFile, writeFile from "node:fs";
>
> And then "* as" would fit in naturally:
>
>     import * as FS, readFile from "node:fs";
>
> I think this might result in on overall better user experience.  I'll
> experiment with this from a parsing standpoint.
>
> What would you think about that?
>
>  _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
> _______________________________________________
> 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/20140806/95077316/attachment.html>


More information about the es-discuss mailing list