Yeah this is definitely one of those places where proxies show their real value. Being able to represent a heap external interface without having to leave JS except for the very minimum amount required. With the Direct Proxies API it'll go from "doable" to "trivial" to implement virtual objects that mostly obey the rules of regular objects and don't blow up if you try to use that as a prototype or use some rarely used but normal JS API (the amount of C++ modules that explode if you do something like Object.getOwnPropertyNames(Object.getPrototypeOf(cplusplusModuleObject)) is actually quite ridiculous).
An interesting use-case I want to try out is that of representing near-synced objects between parent/child/sibling processes. process.env is a good example here as well because it's not generally time critical, but still useful... "near objecst". Something that is usually around a single event loop turn away, because it's out of process or in a js external memory storage, or not in the JS heap for whatever reason, but close enough that the limitation is simply having to post a callback to get at it. Sometimes these things are time critical and C++ apis support that, but usually you just build/use an async API around it. These objects are close enough though that with some creative synchronization a useful proxy interface could be provided that is "close enough" to provide the best of both worlds. A child's process process.env would be an example where the gap could be bridged by a proxy that provided local in-heap access and was semi-lazily synced as needed. This captures the best of both worlds I think, offloading the need to treat an API as asynchronous without resorting to those things which shall not be named. -- Job Board: http://jobs.nodejs.org/ Posting guidelines: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines You received this message because you are subscribed to the Google Groups "nodejs" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
