Shinji KOBAYASHI wrote: > Ruby implementation might be one of the proof for replace of generics. > I had much struggled to implement generics and got the conclusion > that we do not need it.
Ruby doesn't have generics at all, right, Shinji? There's a comparison of generics and inheritance in an appendix of Bertrand Meyer's "Object Oriented Software Construction", 2nd edition. (http://se.ethz.ch/~meyer/publications/acm/geninh.pdf seems to be the original paper that the appendix is based upon.) Generics can be simulated in a language with inheritance, but there is a cost: * Duplication of code. * Extra verbosity. I don't want to have either forced upon me. If I'm unfortunately forced to use a language that doesn't support generics, then I can always simulate it the generics with inheritance. But I certainly wouldn't want the specs to be obfuscated by hacks like that, thanks very much ;-) Peter