Improving ECMAScript as a compilation target

Allen Wirfs-Brock Allen.Wirfs-Brock at microsoft.com
Mon May 4 18:20:30 PDT 2009


I also captured these on the wiki page:

In the function defined for the example's invoke item the first argument to apply probably should be obj rather than peer.

I would be inclined to specify an additional argument (probably the first) for each handler function that would be passed the "this" value. Closure capture like is done in the example works but my intuition is that there will be situations where it would be handy to use the same catch-all descriptor for several objects.

I assume that if one of the properties is missing from the descriptor it simply has its default "not there" behavior.

Is there also an Object.getCatchAllDescriptor function?

Who can set them? Can catch alls be defined on an object if its [ [Extensible]] is false, etc.

Overall, I like this general design direction for catch alls.



More information about the es-discuss mailing list