Example of real world usage of function bind syntax

Isiah Meadows impinball at gmail.com
Thu Jun 11 12:46:03 UTC 2015


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>
> To: es-discuss <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
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150611/5de9dbe8/attachment.html>


More information about the es-discuss mailing list