This post originated from an RSS feed registered with Agile Buzz
by James Robertson.
Original Post: Actual Genericity
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
So if we write generic code that actually takes a "type of anything," that type can only be an Object, and our generic code must only call Object methods on it. So really, we are restricted to code that is already "generic to Object," except for casting up to Object and down from Object, which this wonderful new syntax will do for us. Sounds like it's a solution for collection classes and not much else, doesn't it?
As opposed to languages like Smalltalk (Pythin, Ruby, etc) - where any method you write is able to deal with any object that conforms to the API. As Steven puts it:
Languages like Python, Ruby Smalltalk and Io on the other hand, compile a single method which will work at runtime on all types which respond to the talk method - even ones defined at runtime and all without defining the types of the variables in the calling methods.
You can have simplicity, or complexity. Which makes for a more productive developer?