A Proposal For Formalizing __noSuchMethod__ in ECMAScript 3.1.
igor at mir2.org
Tue Aug 19 02:09:53 PDT 2008
2008/8/19 Allen Wirfs-Brock <Allen.Wirfs-Brock at microsoft.com>:
> Some of my specific issues with the proposal that I think need further work include:
Yet another issue is that __noSuchMethod__ does not work with
call/apply. That is, in foo.bar.call(foo) __noSuchMethod__ is not
invoked as the engine treats foo.bar as an ordinary property access
operation and returns undefined when the property bar does not exist.
To make foo.bar work with the call method one needs special
search-only-for-functions operation, like foo.function::bar, which is
another SpiderMonkey extension. But this is not transparent as the
existing code has to be modified to use the new operation, not the
familiar foo.bar. So a generic mechanism, like the catchAll proposal,
to proxy arbitrary property access would be more appropriate.
More information about the Es-discuss