On Sep 25, 2014, at 7:56 PM, Boris Zbarsky <[email protected]> wrote:
> 
> SpiderMonkey used to support __noSuchMethod__, I believe.

I implemented __noSuchMethod__ long ago, for the TIBET folks (Smalltalk style 
JS framework; they wanted a doesNotUnderstand analogue).

Please note well the difference between __noSuchMethod__ and anything like 
__noSuchProperty__. Even ignoring JITs, back in the interpreter only days, I 
could justify nSM because it was called on a slow path, when the only outcome 
without it was a guaranteed "obj.foo is not callable" or worse, "obj.foo is not 
defined" error.

IOW nSM only kicked in when evaluating

obj.foo(args)

Not just

obj.foo

Any nSP of the kind we seem to be discussing would need to fail fast, on 
evaluation of the dot expression. That is a fast path.

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to