@evildictaitor:

In a strongly typed dynamic language. Again I don't see how changing a type1 to a type2 is going to cause anything other than a type mismatch exception or even a compile-time error unless type1 and type2 are both ducks. The whole "unit test" argument is totally bogus. Static types are not helping you at all! Strong types are. You aren't get type safety from static languages. You are just getting more complicated code.

Duck typing is basically doing the work of adding interfaces to your code so you don't have to think about it. That's all. You can implement it in static languages with a *-ton of interfaces, something like n! interfaces where n is the number of methods/properties. That would be ugly (esp for big classes), but it's doable. Some "pretty OO" designs seem to approach that, with their interface soup. See Android SDK. In what planet is that preferable to duck typing?