case sensitive

Sort by: Display: Hide controls:

  1. Nathanael Schärli, Andrew P. Black, and Stéphane Ducasse. Object-oriented Encapsulation for Dynamically Typed Languages. In Proceedings of 18th International Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA'04), p. 130—149, 2004. Acceptance rate: 27/174 = 16%. DOI 

    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 object-oriented encapsulation results in a slowdown of less than 15 per cent.