At the May TC39 meeting I presented [pdf] an overview of Notification Proxies, as a possible alternative to Direct Proxies. This post briefly summarizes my talk, and the feedback I got from the committee. tl;dr: notification proxies are off the table, we're sticking to direct proxies in ES6.
In this post I will give an overview of Javascript's object model. To a first approximation, by "object model", I mean the mental model that a developer has of an object's structure and behavior. At the end, I will hint at how proxies can be used to implement (variations on) this object model in Javascript itself.
Membranes are a powerful new feature enabled by Javascript proxies, with various use cases. The goal of a membrane is to fully isolate two object graphs.
For the past two years, I have been working on a new Reflection API for ECMAScript (the Javascript standard) together with Mark Miller. Its most novel feature is its support for proxies, objects whose behavior in response to a large number of built-in functions and operators can be controlled in Javascript itself.
Last week, I finally finished a paper that not only describes the new API in some detail, but also describes the principles that helped steer our design.
Andreas Gal from Mozilla is implementing the Proxy API that I developed at Google in collaboration with Mark S. Miller. This API enables the creation of dynamic proxies that can intercept a variety of operations applied to Javascript objects. Proxies are currently available in the Firefox 3.7a pre-release and are scheduled to be included in the next Ecmascript standard. I am in the process of writing up a small tutorial to introduce this new feature.