Catch-all proposal based on proxies

Mark Miller erights at gmail.com
Tue Dec 8 15:38:30 PST 2009


On Tue, Dec 8, 2009 at 2:12 PM, Mike Wilson <mikewse at hotmail.com> wrote:
> I'm guessing that a common use-case is trapping calls to all objects
> delegating to a certain prototype, or all instances of a certain class.

It's not the use case that's motivating us to work on catchalls, but
it may be an important use case. Let's assume it is.

> Do
> you have any thoughts on how this may be optimized? When having 10000
> objects to trap, it seems more efficient to put the catch-all on a single
> augmentation point instead of creating and configuring 10000 proxies?

Have these 10000 objects inherit from a single proxy. The trapping
get/put calls on the handler provide the "receiver" argument, which is
the object on which the failed property access was attempted.

-- 
Text by me above is hereby placed in the public domain

    Cheers,
    --MarkM


More information about the es-discuss mailing list