Duck typing allows type information to be applied at run time.. Generics allow the programmer to specify all ( well, a lot ) of the type infromation at compile time.
If you're interested in a comparison between Ruby and Java you should check out Beyond Java by Bruce Tate.
A lot of the posts have been comparing java and C#'s generics, but the real question is closer to what you asked. Are generics helping programmers write better code?
The jury is still out, but in my opinion the future will look more like Ruby and less like Java or C#.
Duck typing allows type information to be applied at run time.. Generics allow the programmer to specify all ( well, a lot ) of the type infromation at compile time.
If you're interested in a comparison between Ruby and Java you should check out Beyond Java by Bruce Tate.
A lot of the posts have been comparing java and C#'s generics, but the real question is closer to what you asked. Are generics helping programmers write better code?
The jury is still out, but in my opinion the future will look more like Ruby and less like Java or C#.