Community Member Profile
- Profile: /members/7161-Brian-Cavalier.htm
- URL: http://hovercraftstudios.com
- Comments: 2
- Points: 23
Recent Blog Comments By Brian Cavalier
-
Invoking Javascript Methods With Both Named And Ordered Arguments
Posted on Oct 27, 2010 at 11:38 AM
@Ben, Yep, good points. I think an optional context is the way to go. Or, instead of augmenting Function, withNamedArgs could simply accept both a function and a context. Either way, this is cool meta-programming stuff, Ben.... read more »
-
Invoking Javascript Methods With Both Named And Ordered Arguments
Posted on Oct 27, 2010 at 11:05 AM
Hey Ben, pretty interesting! How about instead of invoke() that directly calls the original function, something like Function.withNamedArgs() that returns a new function that caches the argument map in a closure instead of adding a property to the original function? Something like:
read more »



