Example of real world usage of function bind syntax

Isiah Meadows impinball at gmail.com
Fri Jun 12 20:21:58 UTC 2015


Yeah, I am. Oops. Sorry about that.

On Fri, Jun 12, 2015, 13:41 Brendan Eich <brendan at mozilla.org> wrote:

> Any chance you could reply so that your messages show up in thread? Are
> you reading by digest mode, possibly?
>
> /be
>
> Isiah Meadows wrote:
> > I need to be using this library! I, myself, used the syntax for
> > virtual methods quite a bit, and personally replicated a third of your
> > library without realizing it. Also, it's a lot easier and nicer to
> > type `foo.map(::this.bar)` than `foo.map(this.bar.bind(this))` or
> > `foo.map(x => this.bar(x))`. I also (ab)used it to create my own DSL
> > for conditionals that would be equivalent to a condition-less `switch`
> > in CoffeeScript and the like, but that was more of an experiment than
> > anything else.
> >
> >     ---------- Forwarded message ----------
> >     From: Jussi Kalliokoski <jussi.kalliokoski at gmail.com
> >     <mailto:jussi.kalliokoski at gmail.com>>
> >     To: es-discuss <es-discuss at mozilla.org
> >     <mailto:es-discuss at mozilla.org>>
> >     Cc:
> >     Date: Thu, 11 Jun 2015 15:19:28 +0300
> >     Subject: Example of real world usage of function bind syntax
> >     I'm not entirely sure if it's appropriate, but I just published a
> >     library called Trine[1] that takes advantage and displays the
> >     power of the proposed function bind syntax. Consider this my
> >     upvote for the proposal. :)
> >
> >     Has there been any discussion of anyone championing this proposal
> >     for ES2016? I would very much like to see it land, especially
> >     given that I've already been using it extensively in production
> >     via Babel. :P
> >
> >     [1] https://github.com/jussi-kalliokoski/trine
> >     _______________________________________________
> >     es-discuss mailing list
> >     es-discuss at mozilla.org <mailto: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/20150612/a80e6132/attachment.html>


More information about the es-discuss mailing list