I forgot the links in my last email, here they are:
[1] https://github.com/tc39/proposal-decorators
[2] 
https://docs.google.com/document/d/1Qpkqf_8NzAwfD8LdnqPjXAQ2wwh8BBUGynhn-ZlCWT0
Em qua, 28 de nov de 2018 às 20:48, Augusto Moura
<augusto.borg...@gmail.com> escreveu:
>
> In the ~maybe long~ future , after the current decorators proposal [1], we 
> can start thinking about a Method Parameter Decorator (already proposed [2]), 
> we could do something like:
>
> ``` js
> class Foo {
>   constructor(@field foo) {
>   }
> }
> ```
>
> In my opinion, it would be a much more powerful approach
> Em qua, 28 de nov de 2018 às 16:33, Simo Costa <andrysimo1...@gmail.com> 
> escreveu:
> >
> > In costructor functions and in the constructor() method in ES6 classes is 
> > easily to fall in the following pattern:
> >
> > F(par1, par2, ..., parN) {
> >   this.par1 = par1;
> >   this.par2 = par2;
> >   ...
> >   this.parN = parN;
> > }
> >
> >
> > So my proposal is to avoid those repetitions  by prefixing a dot . to each 
> > parameter:
> >
> > F(.par1, .par2, ..., .parN) {}
> >
> > Simple but quite useful. More info here: 
> > https://github.com/jfet97/proposal-fast-this-assignments
> >
> >
> >
> > _______________________________________________
> > es-discuss mailing list
> > es-discuss@mozilla.org
> > https://mail.mozilla.org/listinfo/es-discuss
>
>
>
> --
> Atenciosamente,
>
> Augusto Borges de Moura



-- 
Atenciosamente,

Augusto Borges de Moura
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to