Ephemerons: a new finalization mechanism
Proceedings of the 12th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Contracts for higher-order functions
Proceedings of the seventh ACM SIGPLAN international conference on Functional programming
Transparent proxies for java futures
OOPSLA '04 Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
Proceedings of the 21st annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications
Robust composition: towards a unified approach to access control and concurrency control
Robust composition: towards a unified approach to access control and concurrency control
JavaScript: The Good Parts
Proxies: design principles for robust object-oriented intercession APIs
Proceedings of the 6th symposium on Dynamic languages
ECOOP'10 Proceedings of the 24th European conference on Object-oriented programming
Virtual values for language extension
Proceedings of the 2011 ACM international conference on Object oriented programming systems languages and applications
Chaperones and impersonators: run-time support for reasonable interposition
Proceedings of the ACM international conference on Object oriented programming systems languages and applications
Hi-index | 0.00 |
Proxies are a common technique to virtualize objects in object-oriented languages. A proxy is a placeholder object that emulates or wraps another target object. Both the proxy's representation and behavior may differ substantially from that of its target object. In many OO languages, objects may have language-enforced invariants associated with them. For instance, an object may declare immutable fields, which are guaranteed to point to the same value throughout the execution of the program. Clients of an object can blindly rely on these invariants, as they are enforced by the language. In a language with both proxies and objects with invariants, these features interact. Can a proxy emulate or replace a target object purporting to uphold such invariants? If yes, does the client of the proxy need to trust the proxy to uphold these invariants, or are they still enforced by the language? This paper sheds light on these questions in the context of a Javascript-like language, and describes the design of a Proxy API that allows proxies to emulate objects with invariants, yet have these invariants continue to be language-enforced. This design forms the basis of proxies in ECMAScript 6.