RevGenICSOFTSpringer (In a collection)
|
Author(s) | Alexandre Bergel and Lorenzo Bettini |
Title | « Generic Programming in Pharo » |
In | Software and Data Technologies |
Series | Communications in Computer and Information Science |
Editor(s) | José Cordeiro, Slimane Hammoudi and Marten Sinderen |
Volume | 411 |
Page(s) | 66-79 |
Year | 2013 |
Publisher | Springer |
URL | http://dx.doi.org/10.1007/978-3-642-45404-2_5 |
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. |
@incollection{RevGenICSOFTSpringer,
volume = {411},
author = {Bergel, Alexandre and Bettini, Lorenzo},
series = {Communications in Computer and Information Science},
booktitle = {Software and Data Technologies},
editor = {José Cordeiro and Slimane Hammoudi and Marten Sinderen},
url = {http://dx.doi.org/10.1007/978-3-642-45404-2_5},
title = {{Generic Programming in Pharo}},
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.},
publisher = {Springer},
doi = {10.1007/978-3-642-45404-2_5},
pages = {66-79},
year = {2013},
}
This document was generated by bib2html 3.3.
(Modified by Luca Paolini, under the GNU General Public License)
