Generic Programming in Pharo

3Citations
Citations of this article
3Readers
Mendeley users who have this article in their library.
Get full text

Abstract

Dynamically typed object-oriented languages have been left out of the scope of generic programming: in a dynamically typed setting, the need for generic programming has been less prominent since no restriction applies over the kind of elements a collection may contain. However, when creating an object, the class name is hardcoded in the program, and this makes the object instantiation process hard to abstract from. In this paper, we describe our implementation of generic programming in Pharo, a Smalltalk dialect, showing how programmers can benefit from generic programming even in a dynamically typed language. Furthermore, we enhance the expressiveness of generic programming with reverse generics, a mechanism for automatically deriving new generic code starting from existing non-generic one. As a case study, we show how we used generics and reverse generics in Pharo to reuse unit test cases and to identify a number of bugs and anomalies in the stream class hierarchy. © Springer-Verlag Berlin Heidelberg 2013.

Cite

CITATION STYLE

APA

Bergel, A., & Bettini, L. (2013). Generic Programming in Pharo. In Communications in Computer and Information Science (Vol. 411 CCIS, pp. 66–79). Springer Verlag. https://doi.org/10.1007/978-3-642-45404-2_5

Register to see more suggestions

Mendeley helps you to discover research relevant for your work.

Already have an account?

Save time finding and organizing research with Mendeley

Sign up for free