Russell Leggett (2013-10-14T19:51:44.000Z)
I get that this isn't really the same, but I think one really viable
solution for the scoped method problem (which is really just the expression
problem, right?) is the proposed bind operator
http://wiki.ecmascript.org/doku.php?id=strawman:bind_operator

It doesn't use dots, so it won't mask the difference between the normal
prototype chain with some additional scoped binding (for good or ill), but
along with it comes the clarity and comfort of lexical binding and also the
potential use of the module system.

    import {shuffle,each,filter} from "underscore2";

    myArray::shuffle();

And if that isn't enough because you need more polymorphic behavior, I
think something like Clojure's protocols
<http://clojure.org/protocols>could be implemented as a library to be
used in conjunction.

- Russ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131014/bc7f3d2e/attachment.html>
domenic at domenicdenicola.com (2013-10-14T20:02:42.807Z)
I get that this isn't really the same, but I think one really viable
solution for the scoped method problem (which is really just the expression
problem, right?) is the proposed bind operator
http://wiki.ecmascript.org/doku.php?id=strawman:bind_operator

It doesn't use dots, so it won't mask the difference between the normal
prototype chain with some additional scoped binding (for good or ill), but
along with it comes the clarity and comfort of lexical binding and also the
potential use of the module system.

    import {shuffle,each,filter} from "underscore2";

    myArray::shuffle();

And if that isn't enough because you need more polymorphic behavior, I
think something like [Clojure's protocols](http://clojure.org/protocols) could be implemented as a library to be used in conjunction.