Bug 18058 - JS feature request: __noSuchMethod__
: JS feature request: __noSuchMethod__
Status: RESOLVED WONTFIX
: WebKit
JavaScriptCore
: 523.x (Safari 3)
: Macintosh Mac OS X 10.5
: P2 Enhancement
Assigned To:
:
: InRadar, ReviewedForRadar
:
:
  Show dependency treegraph
 
Reported: 2008-03-24 21:35 PST by
Modified: 2010-06-15 07:26 PST (History)


Attachments
A proposal to the ECMA committee to add 'noSuchMethod' support (3.74 KB, text/plain)
2009-08-31 11:44 PST, William J. Edney
no flags Details
A testcase demonstrating 'proper' __noSuchMethod__ capability. (1.56 KB, text/html)
2009-08-31 11:45 PST, William J. Edney
no flags Details


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2008-03-24 21:35:11 PST
It'd be incredibly awesome if __noSuchMethod__ were implemented in WebKit's version of JS.
------- Comment #2 From 2008-03-24 22:31:48 PST -------
<rdar://problem/5818037>
------- Comment #3 From 2009-08-31 11:43:01 PST -------
I'm gonna poke this bug and add myself to it.

I've been bugging the V8 crowd to add this to their engine:

http://code.google.com/p/v8/issues/detail?id=264

so I'll bug you all to add it to Nitro :-). They have a small patch ready and I've tested it successfully, so maybe we can get some friendly competition here :-D.

A bit of background: as I stated on the V8 bug report, I'm the guy that originally pestered Brendan Eich back in 2003 to add this capability to Spidermonkey:

https://bugzilla.mozilla.org/show_bug.cgi?id=196097

Since he's done that, it's also been included in the Java-based Rhino engine. I've also proposed this extension to the ECMA committee.

I'll attach 2 files to this bug report. One is the proposal that my business partner and I made to the ECMA committee to add 'noSuchMethod' to ECMAScript. The other is a pretty comprehensive set of tests, both one from Brendan and a more complex one from my business partner Scott.

There is a pretty compelling case for adding this to your interpreter and that is spelled out in the ECMA proposal document.

Thanks for your consideration!

Cheers,

- Bill
------- Comment #4 From 2009-08-31 11:44:24 PST -------
Created an attachment (id=38825) [details]
A proposal to the ECMA committee to add 'noSuchMethod' support
------- Comment #5 From 2009-08-31 11:45:18 PST -------
Created an attachment (id=38826) [details]
A testcase demonstrating 'proper' __noSuchMethod__ capability.
------- Comment #6 From 2009-09-01 04:25:22 PST -------
This feature now has a 'bottle of your favorite wine' bounty attached to it :-).

I've had success with such bribery over on the Mozilla project (and, yes, have paid it off - seriously...) :-).

In addition, I'm willing to help in authoring tests, etc. My C skills are very lacking (its been quite a number of years), but I do JS all day long, every day.

Having this feature would allow me to significantly reduce my code size and complexity, so I'm very eager to help make this reality :-).

Cheers,

- Bill
------- Comment #7 From 2009-12-07 16:40:17 PST -------
A proposal for "catch-all proxies" has just been posted to the ES Wiki:

   http://wiki.ecmascript.org/doku.php?id=strawman:proxies
------- Comment #8 From 2010-03-03 11:51:18 PST -------
__noSuchMethod__ is an effectively dead extension in spidermonkey, it is not being proposed for standardisation.  To quote Brendan: "http://wiki.ecmascript.org/doku.php?id=harmony:proxies is the future"
------- Comment #9 From 2010-03-03 11:54:05 PST -------
BTW, http://wiki.ecmascript.org/doku.php?id=harmony:proxies is implemented (useful for spec improvement, necessary by agreement in TC39 -- so a JSC impl would be helpful) for SpiderMonkey, see

https://bugzilla.mozilla.org/show_bug.cgi?id=546590

This will probably land soon, and wind up in the next major Firefox release.

/be