Notification proxies (Was: possible excessive proxy invariants for Object.keys/etc??)
brandon at brandonbenvie.com
Mon Nov 26 12:25:29 PST 2012
There's a few goals I have in mind when thinking about proxies:
* Ability to forward to target at minimal cost.
* Minimal cost for invariant enforcement, preferably automatic since the
result is predetermined
* Near zero cost for invariant enforcement in the majority of cases where
it's not needed
* Ability to virtualize properties with minimal forced overhead (if someone
eagerly deep clones a membrane then that's their cost, not the API's)
When something becomes invariant, then the runtime essentially takes
ownership of it and it no longer belongs to the proxy. The proxy's only
remaining power is being the first to know whenever something is about to
happen. As the proxy creator, I don't really want to spend resources being
responsible for something I no longer have any control over.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss