Pedantic nitpick for no reason: NamedSpecifiers of an ImportDeclaration are 
different from “destructuring”, conflating the two is likely to confuse people 
=)

> On May 19, 2016, at 11:59 AM, Michał Wadas <[email protected]> wrote:
> 
> Idea:
> 
> function foo({bar, *: baz}) {
> 
> }
> 
> would be equivalent to:
> 
> function foo(baz) {
>    const bar =  baz.bar;
> }
> 
> Rationales:
> - little better IDE support (argument name reveals intention)
> - allows to write more concise code when handling case of getting common 
> values and handling whole object optionally
> - improve pattern "use few properties of options object then pass it deeper"
> - allows more expressive module import
> - allows to more concise code when destructuring expression result
> 
> import {*: rand, generateRandomInt} from 'fancy-random-module';
> import {*: moment, isMoment} from 'moment';
> 
> _______________________________________________
> es-discuss mailing list
> [email protected]
> https://mail.mozilla.org/listinfo/es-discuss

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

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

Reply via email to