Re: David’s ProxyMap

Axel Rauschmayer axel at
Thu Oct 25 03:33:44 PDT 2012

> I agree there are use cases for distinguishing method invocations from property accesses (remote method calls are one of them -- you'd want to distinguish between doing an HTTP GET vs POST). But the new API hasn't changed the balance for or against an "invoke" trap. Recall that one of the reasons was that an "invoke" trap would lead to invoke-only methods, which goes against functional programming patterns in Javascript (e.g. people expect to work)

Ah, that makes sense. I previously didn’t understand why invoke-only methods were a problem.

In some ways, invoke-only methods do reflect how things actually work with proxies: they are easier to implement if you don’t have to reify a method. With the current API, you are forced to reify.

Doesn’t the currying incur a cost (for the frequent use case of “virtual methods”)? Could that cost (performance + elegance) be avoided in some other manner?


Dr. Axel Rauschmayer
axel at


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list