My ECMAScript 7 wishlist

Brendan Eich brendan at mozilla.org
Fri Sep 26 07:29:07 PDT 2014


Tab Atkins Jr. wrote:
> I don't understand how you inferred from Andrea's post that "this
> wish-fulfillment __noSuchProperty__ magic property does not have to
> handle superclass delegation.".

I did not infer that from Andrea's post as his position -- rather the 
reverse, because he said "I also think Proxy already gives us a way 
...", to wit the code I showed earlier. Hence my confusion about what 
was being proposed that differed.

>    At minimum it needs to handle
> delegating to the object's own prototype (it would be a pretty poor
> NSP if it couldn't handle methodMissing use-cases as well), and I
> don't think there's a reasonable case to stop at just one level up;
> doing so would make this very fragile to refactoring your hierarchy,
> as methods show up as missing or not depending on where they end up in
> the class hierarchy.

Methinks you protest too much. Just put it below Object.prototype and 
get on with life. That was the idea, anyway.

Yes, what you propose is more flexible. Also more costly. Good luck 
selling implementors! I hope Andreas will comment now.

/be


More information about the es-discuss mailing list