Tuesday, August 19th, 2008

Getting method_missing, or _noSuchMethod into Harmony

Category: JavaScript

Yehuda Katz saw the Harmony news, and wondered if there was a change to get _noSuchMethod, which currently works in implementations such as SpiderMonkey, into the new JavaScript world of: Harmony = ES3.1++.

In summary, it seems that the two groups agreed to focus cooperative effort of ECMAScript 3.1, a modest improvement of the current JavaScript that includes some new features like the ability to mark properties as non-enumerable and freezing objects (which can be used to implement classes).

After that is complete, the two groups have agreed to work on a new version of JavaScript dubbed “Harmony”, which will be a more modest evolution of the current JavaScript, minus some of the more ambitious features like namespaces and packages. Other features, like classes, will likely be implemented in terms of new features in ES3.1 like freeze().

Which brings me to the title of my post. Now that it seems as though ES3.1 will be embraced by all the browser vendors moving forward (and will likely be the implemented iteration of JS for at least a little while), I wondered what sorts of features might still make it into ES3.1 before the spec was closed.

Specifically, I’ve long been interested in trying to get method_missing into JavaScript, and in fact, it is already available in Firefox/Spidermonkey as __noSuchMethod__. In fact, Johnson makes use of noSuchMethod in its Ruby proxy.

Want to get it in ASAP? Make your voice heard to the technical committee.

Posted by Dion Almaer at 10:17 am
1 Comment

++++-
4 rating from 14 votes

1 Comment »

Comments feed TrackBack URI

A few ways it would help JavaScriptMVC: http://javascriptmvc.com/blog/?p=74

Comment by JustinMeyer — August 19, 2008

Leave a comment

You must be logged in to post a comment.