Abstract
Proxies are a powerful approach to implement meta-objects in object-oriented languages without having to resort to metacircular interpretation. We introduce such a meta-level API based on proxies for Javascript. We simultaneously introduce a set of design principles that characterize such APIs in general, and compare similar APIs of other languages in terms of these principles. We highlight how principled proxy-based APIs improve code robustness by avoiding interference between base and meta-level code that occur in more common reflective intercession mechanisms.
- }}G. Bracha and D. Griswold. Strongtalk: typechecking smalltalk in a production environment. In OOPSLA '93: Proceedings of the eighth annual conference on Object-oriented programming systems, languages, and applications, pages 215--230, NY, USA, 1993. ACM. ISBN 0-89791-587-9. http://doi.acm.org/10.1145/165854.165893. Google ScholarDigital Library
- }}G. Bracha and D. Ungar. Mirrors: Design principles for meta-level facilities of object-oriented programming languages. In OOPSLA '04: Proceedings of the 19th annual Conference on Object-Oriented Programming, Systems, Languages and Applications, pages 331--343, 2004. Google ScholarDigital Library
- }}G. Bracha, P. Ahé, V. Bykov, Y. Kashai, W. Maddox, and E. Miranda. Modules as objects in newspeak. In ECOOP '10: Proceedings of the 24th European Conference on Object Oriented Programming, Maribor, Slovenia, LNCS. Springer Verlag, June 2010. Google ScholarDigital Library
- }}J. Brant, B. Foote, R. E. Johnson, and D. Roberts. Wrappers to the rescue. In ECOOP '98: Proceedings of the 12th European Conference on Object-Oriented Programming, pages 396--417, London, UK, 1998. Springer-Verlag. ISBN 3-540-64737-6. Google ScholarDigital Library
- }}D. Crockford. phJavascript: The Good Parts. O'Reilly, 2008. Google ScholarDigital Library
- }}S. Ducasse. Evaluating message passing control techniques in smalltalk. Journal of Object-Oriented Programming (JOOP), 12: 39--44, 1999.Google Scholar
- }}009)}ECMA262ECMA International. ECMA-262: ECMAScript Language Specification. ECMA, Geneva, Switzerland, fifth edition, December 2009. URL http://www.ecma-international.org/publications/standards/Ecma-327.htm.Google Scholar
- }}P. Eugster. Uniform proxies for java. In OOPSLA '06: Proceedings of the 21st annual conference on Object-oriented programming systems, languages, and applications, pages 139--152, NY, USA, 2006. ACM. ISBN 1-59593-348-4. http://doi.acm.org/10.1145/1167473.1167485. Google ScholarDigital Library
- }}B. Foote and R. E. Johnson. Reflective facilities in smalltalk-80. In OOPSLA '89: Conference proceedings on Object-oriented programming systems, languages and applications, pages 327--335, NY, USA, 1989. ACM. ISBN 0--89791--333--7. http://doi.acm.org/10.1145/74877.74911. Google ScholarDigital Library
- }}A. Gal. Efficient bytecode verification and compilation in a virtual machine. PhD thesis, University of California, Irvine, Long Beach, CA, USA, 2006. Google ScholarDigital Library
- }}G. Kiczales, J. D. Rivieres, and D. G. Bobrow. The Art of the Metaobject Protocol. MIT Press, Cambridge, MA, USA, 1991. ISBN 0262111586. Google ScholarDigital Library
- }}M. Miller, E. D. Tribble, and J. Shapiro. Concurrency among strangers: Programming in E as plan coordination. In Symposium on Trustworthy Global Computing, pages 195--229. Springer, 2005. Google ScholarDigital Library
- }}M. S. Miller. Robust Composition: Towards a Unified Approach to Access Control and Concurrency Control. PhD thesis, John Hopkins University, Baltimore, Maryland, USA, May 2006.\balancecolumns Google ScholarDigital Library
- }}M. S. Miller. Weak maps proposal for ECMA Script Harmony, 2010. tinyurl.com/weak-maps.Google Scholar
- }}M. S. Miller and K. Reid. Proxies for eventual references in E, 2009. wiki.erights.org/wiki/Proxy.Google Scholar
- }}M. S. Miller, M. Samuel, B. Laurie, I. Awad, and M. Stay. Caja: Safe active content in sanitized javascript, June 2008. tinyurl.com/caja-spec.Google Scholar
- }}t al.(2007)Mostinckx, Van Cutsem, Timbermont, and Tanter}mostinckx07behavioralS. Mostinckx, T. Van Cutsem, S. Timbermont, and E. Tanter. Mirages: Behavioral intercession in a mirror-based architecture. In Proceedings of the Dynamic Languages Symposium - OOPSLA'07 Companion, pages 222--248. ACM Press, 2007. Google ScholarDigital Library
- }}D. D. Redell. Naming and Protection in Extensible Operating Systems. PhD thesis, Department of Computer Science, University of California at Berkeley, Nov 1974.Google Scholar
- }}Caromel, and Cointe}tanter03pbhÉ. Tanter, J. Noyé, D. Caromel, and P. Cointe. Partial behavioral reflection: spatial and temporal selection of reification. In OOPSLA '03: Proceedings of the 2003 Conference on Object-Oriented Programming Systems, Languages and Applications, pages 27--46. ACM, 2003. Google ScholarDigital Library
- }}D. Ungar and R. B. Smith. Self: The power of simplicity. In OOPSLA '87: Conference proceedings on Object-oriented Programming Systems, Languages and Applications, pages 227--242. ACM Press, 1987. ISBN 0-89791-247-0. http://doi.acm.org/10.1145/38765.38828. Google ScholarDigital Library
Index Terms
- Proxies: design principles for robust object-oriented intercession APIs
Recommendations
Proxies: design principles for robust object-oriented intercession APIs
DLS '10: Proceedings of the 6th symposium on Dynamic languagesProxies are a powerful approach to implement meta-objects in object-oriented languages without having to resort to metacircular interpretation. We introduce such a meta-level API based on proxies for Javascript. We simultaneously introduce a set of ...
Trustworthy proxies: virtualizing objects with invariants
ECOOP'13: Proceedings of the 27th European conference on Object-Oriented ProgrammingProxies 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 ...
Zero-overhead metaprogramming: reflection and metaobject protocols fast and without compromises
PLDI '15: Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and ImplementationRuntime metaprogramming enables many useful applications and is often a convenient solution to solve problems in a generic way, which makes it widely used in frameworks, middleware, and domain-specific languages. However, powerful metaobject protocols ...
Comments