Yes, type-safety leads to more robust code. But at what cost?
You never find every bug in testing. The earlier you find a bug, the cheaper it is to fix (fewer people involved, less communication, etc). The cheapest way to fix a bug is to have your language or compiler prevent it from happening.
I had a client who had a standing bet for over a year, offering a free hamburger for finding an actual bug in my code. Type safety helped make that possible.
In general, compilers or languages preventing bugs is a good thing, but it can be taken to an extreme. XSLT does not allow you to update the value of a variable. As a result, you have to use recursion to make a simple loop (I'm writing this in pig-java/pig-C because XSLT has awful syntax which I fail to remember):
function sumList(x) {
if (x.length > 1) {
return sumList(x.tail) + x.head;
} else {
return x.head;
}
}
There are benefits to this approach (few side effects), but this also forces fragmentation on the code where all kinds of things were broken off into separate little functions. It was difficult to avoid doing things multiple times, and this led to all kinds of other bugs and slow performance that were worse than accidentally changing the value of a variable.
Back to type safety. Usually, if I have a function washFabric(Fabric f) and I pass it a Cat instead of a Fabric, this is a simple error on my part. When you have this hidden in layers of function calls, such a mistake is very easy to make and hard to test for. When my code compiles in a type-safe language, I know I didn't make this kind of error. For this reason, I find type-safety a good trade-off between speed of slapping something together that works, and being sure it won't break.
Type safety does slow you down. In Ruby or perl, you can create a wash(f) method and throw a cat in the wash and either the cat comes out clean, or dead, or still dirty. But in Java, you have to create a Washable interface and painstakingly define methods like soak(), addSoap(), agitate(), spin() and rinse() and think about what it means to be washable so that someone making a Cat class can study the Washable interface and decide whether a cat should be Washable or not. That takes a lot of time and effort.
If you want a one-time use report written in an hour, then type safety will just slow you down. But if you have a bunch of programmers working on a huge system that will last for years and has to be very fault tolerant, then you can pry type safety from my cold dead hands. :-)