Unbound arrow functions?

Herby Vojčík herby at mailbox.sk
Sat Jun 20 18:47:47 UTC 2015



Dňa 20. júna 2015 19:31:18 CEST používateľ Erik Arvidsson <erik.arvidsson at gmail.com> napísal:
> ES'15 provides dedicated method syntax. What are your use cases that
> are
> not covered by methods?

Or, ultimately, by function keyword. If I understand correctly, what you want is "arrowlike" equivalent of what function keyword already provides. If it is not the case, just ignore the rest. If it is, the state is, IIRC, that this went through the discussion some year ago and the consensus was, no shorter form of function should be added just for convenience - only the lexically bound one as it actually brings actual added value.

> On Sat, Jun 20, 2015 at 12:13 PM Isiah Meadows <impinball at gmail.com>
> wrote:
> 
> > There already exists a syntax for lexically bound functions, but
> couldn't
> > there be an unbound counterpart? I am aware I brought this up
> before, but
> > I'm still missing it with smaller methods that still need `this`.
> It's easy
> > to macro, but it feels weird to have a lexically bound lambda and
> not an
> > unbound equivalent to the anonymous function expression.
> >
> > <aside class="biased">
> > Also, it's the only reason CoffeeScript still seems attractive in
> any way.
> > I know I'm a little opinionated in this area, but I'd rather use ES
> 2015 to
> > CoffeeScript any day.
> > </aside>
> > _______________________________________________
> > 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



More information about the es-discuss mailing list