Just like no car will ever be able to transfer hundreds of people across an ocean.
That is not the purpose of static types, instead they offer a basic guarantee on correctness, a minimal correctness proof on the structures of the program and in particular a sanity check on your logic to see if the structures implied by your types are in fact inhabited (excluding bottom type).
Or say if the type diagrams on a series of function you are trying to use commute.
If your static type system includes dimenions / physical units, you can spot a lot of typos in formulas. (Of course, you will also be required to add some conversion factors, when you want to express something like "Open as many connections as the sum of number of hard disks plus number of users.")
You're right. I didn't consider this too. Have you tried a language with units?
I've tried it in F# and seen it in Frink. I found it cool but havent found a need for it. I suspect that is at least partially due to being used to not having it in a language.
A friend of mine hacked up his Lisp, with lots of macros, of course, to check units at compile time. I haven't really used his system, but he was quite keen on it.
Yep, someone here added a type check to Ruby, there are some functions through the codebase that check each argument but I've not seen any real life benefit.
That is not the purpose of static types, instead they offer a basic guarantee on correctness, a minimal correctness proof on the structures of the program and in particular a sanity check on your logic to see if the structures implied by your types are in fact inhabited (excluding bottom type).
Or say if the type diagrams on a series of function you are trying to use commute.
See http://en.wikipedia.org/wiki/Curry%E2%80%93Howard_correspond... for some interesting stuff.