| Object-oriented encapsulation for dynamically typed languages |
| Full text |
Pdf
(392 KB)
|
| Source
|
Conference on Object Oriented Programming Systems Languages and Applications
archive
Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications
table of contents
Vancouver, BC, Canada
SESSION: Inheritance
table of contents
Pages: 130 - 149
Year of Publication: 2004
ISBN:1-58113-831-9
Also published in ...
|
|
Authors
|
|
| Sponsors |
|
| Publisher |
|
| Bibliometrics |
Downloads (6 Weeks): 17, Downloads (12 Months): 119, Citation Count: 3
|
|
|
ABSTRACT
Encapsulation in object-oriented languages has traditionally been based on static type systems. As a consequence, dynamically-typed languages have only limited support for encapsulation. This is surprising, considering that encapsulation is one of the most fundamental and important concepts behind object-oriented programming and that it is essential for writing programs that are maintainable and reliable, and that remain robust as they evolve. In this paper we describe the problems that are caused by insufficient encapsulation mechanisms and then present object-oriented encapsulation, a simple and uniform approach that solves these problems by bringing state of the art encapsulation features to dynamically typed languages. We provide a detailed discussion of our design rationales and compare them and their consequences to the encapsulation approaches used for statically typed languages. We also describe an implementation of object-oriented encapsulation in Smalltalk. Benchmarks of this implementation show that extensive use of object-oriented encapsulation results in a slowdown of less than 15 percent.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
O. Agesen, L. Bak, C. Chambers, B.-W. Chan, U. Hölzle, J. Maloney, R. B. Smith, D. Ungar, and M. Wolczko. The SELF 4.0 Programmer's Reference Manual. Sun Microsystems, 1995.
|
 |
2
|
Jonathan Aldrich , Valentin Kostadinov , Craig Chambers, Alias annotations for program understanding, Proceedings of the 17th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, November 04-08, 2002, Seattle, Washington, USA
|
| |
3
|
P. S. Almeida. Balloon types: Controlling sharing of state in data types. In Proceedings ECOOP '97, pages 32--59. Springer Verlag, June 1997.
|
| |
4
|
|
| |
5
|
M. Barnett and D. A. Naumann. Friends need a bit more: Maintaining invariants over shared state. In Proceedings MPC 2004, July 2004. To appear.
|
| |
6
|
|
| |
7
|
|
 |
8
|
Chandrasekhar Boyapati , Barbara Liskov , Liuba Shrira, Ownership types for object encapsulation, Proceedings of the 30th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, p.213-223, January 15-17, 2003, New Orleans, Louisiana, USA
|
| |
9
|
|
| |
10
|
|
| |
11
|
|
| |
12
|
|
 |
13
|
David G. Clarke , John M. Potter , James Noble, Ownership types for flexible alias protection, Proceedings of the 13th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.48-64, October 18-22, 1998, Vancouver, British Columbia, Canada
|
| |
14
|
The E Language. http://www.erights.org/.
|
| |
15
|
|
| |
16
|
|
 |
17
|
John Hogg, Islands: aliasing protection in object-oriented languages, Conference proceedings on Object-oriented programming systems, languages, and applications, p.271-285, October 06-11, 1991, Phoenix, Arizona, United States
|
 |
18
|
|
 |
19
|
Dan Ingalls , Ted Kaehler , John Maloney , Scott Wallace , Alan Kay, Back to the future: the story of Squeak, a practical Smalltalk written in itself, Proceedings of the 12th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.318-326, October 05-09, 1997, Atlanta, Georgia, United States
|
| |
20
|
|
| |
21
|
P. Müller and A. Poetzsch-Heffter. Universes: A type system for alias and dependency control. Technical Report 279, Fernuniversität Hagen, 2001.
|
 |
22
|
|
| |
23
|
|
| |
24
|
|
| |
25
|
|
| |
26
|
N. Schärli, S. Ducasse, O. Nierstrasz, and A. Black. Traits: Composable units of behavior. In Proceedings ECOOP 2003, pages 248--274. Springer Verlag, July 2003.
|
| |
27
|
N. Schärli, S. Ducasse, O. Nierstrasz, and R. Wuyts. Composable encapsulation policies. In Proceedings ECOOP 2004. Springer Verlag, June 2004. To appear.
|
 |
28
|
|
 |
29
|
Patrick Steyaert , Carine Lucas , Kim Mens , Theo D'Hondt, Reuse contracts: managing the evolution of reusable assets, Proceedings of the 11th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, p.268-285, October 06-10, 1996, San Jose, California, United States
|
| |
30
|
|
|