Generics and reverse generics for Pharo
Keywords: tests, unit, hierarchies, codes, class, smalltalk, pharo, programming, generic
Abstract
Generic programming is a mechanism for re-using code by abstracting specific types used in classes and programs. In this paper, we present a mechanism for adding generic programming in dynamically typed languages, showing how programmers can benefit from generic programming. 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. We implemented generics and reverse generics in Pharo Smalltalk, and we successfully used them to solve a problem of reusing unit test cases. This helped us to identify a number of bugs and anomalies in the stream class hierarchy.
Más información
Título de la Revista: | Unknown (9789898565198) |
Editorial: | Unknown |
Fecha de publicación: | 2012 |
Página de inicio: | 363 |
Página final: | 372 |
URL: | http://www.scopus.com/inward/record.url?eid=2-s2.0-84868695534&partnerID=40&md5=3569da79c94237573025ef1cf66cf66a |