noSuchMethod?

Yehuda Katz wycats at gmail.com
Sun Aug 17 12:54:10 PDT 2008


Has any thought been given to adding Object#__noSuchMethod__ or the like
(propertyNotFound, method_missing, or whatever it would be called) in
ES3.1/Harmony?

I ask because another commonly requested feature, mixins, is easily
implementable in terms of noSuchMethod and getters/setters.

I'm not sure about the implications for implementors or performance
(noSuchMethod probably requires a second method lookup pass; I'm not sure
how much overhead method lookup has in JS), but being able to override
method dispatch itself via a mechanism like this is very powerful.

-- 
Yehuda Katz
Developer | Engine Yard
(ph) 718.877.1325
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.mozilla.org/pipermail/es-discuss/attachments/20080817/d62ea95d/attachment.html 


More information about the Es-discuss mailing list