Example of real world usage of function bind syntax

Jordan Harband ljharb at gmail.com
Thu Jun 11 15:56:32 UTC 2015

I find the call form of the operator (`a::b()`) very useful on its own.

However, I think the main question is, will shipping the prefixed bind or
prefixed call forms of the operator (`::a.b`, `::a.b()`), and/or the bind
form of the operator (`a::b`), definitely preclude future extension
with partial application, etc, or can those still be worked in somehow? If
there's a way to include all four forms and leave open the future
possibility of extension, I think, as Domenic points out, that we would see
a lot of value from the bind and prefix forms as well.

On Thursday, June 11, 2015, Domenic Denicola <d at domenic.me> wrote:

> From: es-discuss [mailto:es-discuss-bounces at mozilla.org <javascript:;>]
> On Behalf Of Matthew Robb
> > ​​I would be significantly less excited about it if this happens. The
> ability to pass around "lightly" bound references to methods is a big deal
> imo and a large part of the value in this proposal.
> Definitely agree. Being able to do `foo.map(::this.bar)` is really great,
> and even `const extracted = ::foo.bar` is nothing to sneeze at.
> I know there's a thread on the issue tracker where a few vocal voices are
> complaining that they want partial application syntax and bikeshedding on
> various operator forms related to that, but I don't think that should
> discourage the excellent benefits that you're giving to everyone but those
> few.
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org <javascript:;>
> https://mail.mozilla.org/listinfo/es-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150611/150e39fc/attachment.html>

More information about the es-discuss mailing list