Scoped binding of a method to an object

Russell Leggett russell.leggett at gmail.com
Tue Oct 15 09:15:04 PDT 2013


On Tue, Oct 15, 2013 at 11:59 AM, Allen Wirfs-Brock
<allen at wirfs-brock.com>wrote:

>
> On Oct 15, 2013, at 7:22 AM, Russell Leggett wrote:
>
> >
> > If we didn't have :: (which we don't now), I think people will continue
> to simply use functions like what underscore does. Personally, I'm ok with
> that. If I want to have unscoped extensions and live with the consequences
> - I will be happy to use symbols. If I want to make a polyfill, I'll just
> do it the same way we've been doing it. But, as much as Allen seems to
> accuse me of being an FP guy, I still want to have a thing which feels like
> a method to be on the right so I find that using :: (if it existed) would
> be a nice compromise.
>
> Hey, it was a general rant and not specifically directed at you or anybody
> else.
>
>
Sure, no offense taken, I just don't put myself in that camp. Even the use
of |this| I think is justified as not an FP abuse, I just haven't gotten a
chance to flesh out my reasoning yet. Without elaborating too much, (sorry,
no time right now), I basically envision the blend of clojure protocols and
javascript as basically external mixins. Not just a single function, but
potentially a set, and using the |this| for single dispatch the way clojure
protocols use the first arg.

- Russ
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20131015/877aeb3a/attachment.html>


More information about the es-discuss mailing list