Generics and Reverse Generics for Dynamic Languages

Generics and Reverse Generics for Pharo

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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Wonky

Reminds me of the informal phrase used in math, where someone will demonstrate something like:

f(7) = g(7*7)

And then claim "and this works for arbitrary values of 7". I suppose 7 is a perfectly fine name for a variable so long as it's not also being used as the constant.

+1

[..]

Ahem

I'm incomfortable with your comment that reads as a claim that the work discussed has no value. This is disrespectful of the authors, not representative of the tone of discussion I would like to see on LtU, and it's not constructive at all -- you don't give a criticism of the paper based on specific claims, you are just insulting it.

Generic issue (no pun intended)

[..]

I am with gasche. I have no

I am with gasche. I have no idea what the original comment meant, if it is not about the paper, and we all have read many papers so we pretty much know how we want them discussed here.