bind operator (was: arrow function syntax simplified)

Kevin Smith khs4473 at
Wed Mar 28 12:57:31 PDT 2012

Russell, I looked at the other thread more carefully and now understand
what you're saying.  Can't we use a bound |this| function for all these

    needsCallback(x =>;
    needsCallback(x =>;

    // Suppose for a moment that -> also binds |this|
    needsCallback((x, y) -> {
  if (x) this.doX(x);
 else this.doY(y);

It seems that with bound |this| functions, the need to explicitly bind
|this| tends to fall away.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list