This thread is based on conversations in the "Scoped binding of a method to
an object" discussion. I suggested using the proposed bind operator "::" as
an alternative, and hinted at way of doing so polymorphically. Given that
the other discussion on refinements just popped up, I figured I might as
well toss of the gist I had been working on.
I wouldn't necessarily call this a proposal, although I think something
like it could be a great addition to the language. Given that it could be
polyfilled, I'm guessing that it may do better as a library first to get
the kinks out, but who knows - if there is enough positive response, maybe
something will come of it - at least some hooks to make single dispatch on
type more efficient, perhaps? Anyway, enjoy!
This thread is based on conversations in the "Scoped binding of a method to
an object" discussion. I suggested using the proposed bind operator "::" as
an alternative, and hinted at way of doing so polymorphically. Given that
the other discussion on refinements just popped up, I figured I might as
well toss of the gist I had been working on.
https://gist.github.com/genericallyloud/7086380
I wouldn't necessarily call this a proposal, although I think something
like it *could* be a great addition to the language. Given that it could be
polyfilled, I'm guessing that it may do better as a library first to get
the kinks out, but who knows - if there is enough positive response, maybe
something will come of it - at least some hooks to make single dispatch on
type more efficient, perhaps? Anyway, enjoy!
- Russ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131021/8cbe5768/attachment.html>
This thread is based on conversations in the "Scoped binding of a method to an object" discussion. I suggested using the proposed bind operator "::" as an alternative, and hinted at way of doing so polymorphically. Given that the other discussion on refinements just popped up, I figured I might as well toss of the gist I had been working on.
gist.github.com/genericallyloud/7086380
I wouldn't necessarily call this a proposal, although I think something like it could be a great addition to the language. Given that it could be polyfilled, I'm guessing that it may do better as a library first to get the kinks out, but who knows - if there is enough positive response, maybe something will come of it - at least some hooks to make single dispatch on type more efficient, perhaps? Anyway, enjoy!