Object-oriented Encapsulation for Dynamically Typed Languages

Schärli, Nathanael; Black, Andrew P.; Ducasse, Stéphane (October 2004). Object-oriented Encapsulation for Dynamically Typed Languages. In: OOPSLA: ACM SIGPLAN Object Oriented Programming Systems and Applications Conference (pp. 130-149). ACM 10.1145/1028976.1028988

[img] Text
p130-scharli.pdf - Published Version
Restricted to registered users only
Available under License Publisher holds Copyright.

Download (392kB)

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 show that extensive use of objectoriented encapsulation results in a slowdown of less than 15 per cent.

Item Type:

Conference or Workshop Item (Paper)

Division/Institute:

08 Faculty of Science > Institute of Computer Science (INF)
08 Faculty of Science > Institute of Computer Science (INF) > Software Composition Group (SCG) [discontinued]

UniBE Contributor:

Ducasse, Stephane

Subjects:

000 Computer science, knowledge & systems
500 Science > 510 Mathematics

ISBN:

1-58113-831-8

Publisher:

ACM

Language:

English

Submitter:

Anja Ebeling

Date Deposited:

06 Nov 2017 13:28

Last Modified:

11 Apr 2024 16:11

Publisher DOI:

10.1145/1028976.1028988

BORIS DOI:

10.7892/boris.104764

URI:

https://boris.unibe.ch/id/eprint/104764

Actions (login required)

Edit item Edit item
Provide Feedback