ACM Home Page
Please provide us with feedback. Feedback
Object-oriented encapsulation for dynamically typed languages
Full text PdfPdf (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
Nathanael Schärli  University of Bern, Bern, Switzerland
Andrew P. Black  Oregon Health & Science University, Portland, OR
Stéphane Ducasse  University of Bern, Bern, Switzerland
Sponsors
SIGPLAN: ACM Special Interest Group on Programming Languages
ACM: Association for Computing Machinery
SIGSOFT: ACM Special Interest Group on Software Engineering
Publisher
ACM  New York, NY, USA
Bibliometrics
Downloads (6 Weeks): 18,   Downloads (12 Months): 123,   Citation Count: 3
Additional Information:

abstract   references   cited by   index terms   collaborative colleagues  

Tools and Actions: Request Permissions Request Permissions    Review this Article  
DOI Bookmark: Use this link to bookmark this Article: http://doi.acm.org/10.1145/1028976.1028988
What is a DOI?

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
 
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
 
9
 
10
 
11
 
12
13
 
14
The E Language. http://www.erights.org/.
 
15
 
16
17
18
19
 
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
 
30


Collaborative Colleagues:
Nathanael Schärli: colleagues
Andrew P. Black: colleagues
Stéphane Ducasse: colleagues