Yeah, well. We could provide an interface for registering these methods for those plugins that are interested. Still, someone could expect a method to be registered when it's not.
The other option is to pass the method name as first argument, works around this but it loses the I-call-the-analog-method thing. On Fri, Oct 3, 2008 at 5:51 PM, Yehuda Katz <[EMAIL PROTECTED]> wrote: > The only tricky thing here is that because JS has no method_missing or > cross-browse __noSuchMethod__, we'd be forced to explicitly write all the > proxies, which could become messy when they work for core methods, but not > all plugins. > Or maybe I'm just being a nervous nelly. > > -- Yehuda > > > On Fri, Oct 3, 2008 at 1:46 PM, Ariel Flesler <[EMAIL PROTECTED]> wrote: > >> Note that John's code doesn't do actual currying, but partial evaluation. >> >> http://en.wikipedia.org/wiki/Partial_evaluation >> >> Currying is a complex concept in comparison to the latter. >> Anyway, you can change the name if you want, the idea is simple, create a >> closure with fixed parameters. >> We can name it callback (though it's long) >> >> jQuery("#test").hide("slow", jQuery.callback.show("slow") ); >> >> Not to hard to understand IMO, and no CS involved :) >> >> >> On Fri, Oct 3, 2008 at 5:41 PM, Yehuda Katz <[EMAIL PROTECTED]> wrote: >> >>> As in Computer Science. >>> Using a currying function requires people new to jQuery to go look it up, >>> where they'll encounter: >>> >>> http://en.wikipedia.org/wiki/Curry >>> >>> and probably eventually: >>> >>> http://en.wikipedia.org/wiki/Currying >>> >>> "Given a function *f* of type [image: f \colon (X \times Y) \to Z], >>> then *currying* it makes a function [image: \mbox{curry}(f) \colon X \to >>> (Y \to Z)]. That is, curry(*f*) takes an argument of type *X* and >>> returns a function of type [image: Y \to Z].*Uncurrying* is the reverse >>> transformation." >>> >>> >>> Prototype added features like this to 1.6, and while they're interesting >>> and useful, they make it hard for people coming to a codebase (especially >>> people new to the framework) to understand what's happening in the code. >>> >>> >>> On Fri, Oct 3, 2008 at 1:34 PM, Ariel Flesler <[EMAIL PROTECTED]>wrote: >>> >>>> CS as in Counter Strike ? :D >>>> Heh, no really... what is CS, forgive my ignorance :P >>>> >>>> On Fri, Oct 3, 2008 at 5:30 PM, Yehuda Katz <[EMAIL PROTECTED]> wrote: >>>> >>>>> Any feature that requires knowledge of CS is a no-go in my book :P >>>>> -- Yehuda >>>>> >>>>> On Fri, Oct 3, 2008 at 1:27 PM, Ariel Flesler <[EMAIL PROTECTED]>wrote: >>>>> >>>>>> Eh, nothing, got it wrong. >>>>>> >>>>>> We could just save all these methods on a special object. >>>>>> >>>>>> jQuery("#test").hide("slow", jQuery.curry.show("slow") ); >>>>>> >>>>>> The name could be changed of course. >>>>>> >>>>>> Or renamed methods (probably bad option) >>>>>> >>>>>> jQuery("#test").hide("slow", jQuery.curriedShow("slow") ); >>>>>> >>>>>> On Fri, Oct 3, 2008 at 5:14 PM, John Resig <[EMAIL PROTECTED]> wrote: >>>>>> >>>>>>> >>>>>>> > It is indeed. You can't expect parameters though and you could get >>>>>>> conflict >>>>>>> > with the actual parameters sent by the caller. >>>>>>> >>>>>>> I'm not sure what you're referring to - are you referring to a bug in >>>>>>> the code? Do you have an example? >>>>>>> >>>>>>> --John >>>>>>> >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> Ariel Flesler >>>>>> http://flesler.blogspot.com >>>>>> >>>>>> >>>>>> >>>>> >>>>> >>>>> -- >>>>> Yehuda Katz >>>>> Developer | Engine Yard >>>>> (ph) 718.877.1325 >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> Ariel Flesler >>>> http://flesler.blogspot.com >>>> >>>> >>>> >>> >>> >>> -- >>> Yehuda Katz >>> Developer | Engine Yard >>> (ph) 718.877.1325 >>> >>> >>> >> >> >> -- >> Ariel Flesler >> http://flesler.blogspot.com >> >> >> > > > -- > Yehuda Katz > Developer | Engine Yard > (ph) 718.877.1325 > > > > -- Ariel Flesler http://flesler.blogspot.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "jQuery Development" group. To post to this group, send email to jquery-dev@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/jquery-dev?hl=en -~----------~----~----~----~------~----~------~--~---