Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)
brandon at brandonbenvie.com
Sun Nov 25 04:15:05 PST 2012
I think it could be argued that the two categories of proxy uses have
different enough fundamentals that they would be better suited broken into
two separate types of proxies. They use a common protocol for dispatching
notifications/requests, but the result is incompatible.
For a Notification Proxy the trap is notified and then action proceeds
against the ProxyTarget as it would normally. This is the simple case since
it merely adds a pre-notification to the front of all trapped operations
and nothing else changes.
For a Virtual Proxy the invariant-sensitive attributes of the virtual
target act like those of a Notification Proxy. Any time something becomes
invariant, whether it be a property or the whole object, the value is
reified from being virtual to being an actual property. From that point on
the property or the whole Proxy changes behavior from Virtual to
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss