Publications

Stats

View publication

Title On the Use of Type Predicates in Object-Oriented Software: The Case of Smalltalk
Authors Oscar Callau, Romain Robbes, Éric Tanter, David Roethlisberger, Alexandre Bergel
Publication date February 2015
Abstract Object-orientation relies on polymorphism to express
behavioral
variants. As opposed to traditional procedural design, explicit type-based
conditionals should be avoided. This message is conveyed in introductory
material on object orientation, as well as in object-oriented reengineering
patterns. Is this principle followed in practice? In other words, are type
predicates actually used in object-oriented software, and if so, to which
extent?
\n\n
Answering these questions will assist practitioners and researchers with
providing information about the state of the practice, and informing the
active research program of retrofitting type systems, clarifying whether
complex flow-sensitive typing approaches are necessary. Other areas, such as
refactoring and teaching object orientation, can also benefit from empirical
evidence on the matter.
\n\n
We report on a study of the use of type predicates in a large base of over 4
million lines of Smalltalk code. Our study shows that type predicates are in
fact widely used to do explicit type dispatch, suggesting that
flow-sensitive typing approaches are necessary for a type system retrofitted
for a dynamic object-oriented language.
Downloaded 4 times
Pages 135-146
Volume 50
Journal name ACM SIGPLAN Notices
Publisher ACM Press (New York, NY, USA)
PDF View PDF
Reference URL View reference page