From: Paul Brannan Date: 2002-12-18T01:49:44+09:00 Subject: Re: help -- persuade my boss to adopt ruby On Wed, Dec 18, 2002 at 12:55:06AM +0900, Dan Sugalski wrote: > In my experience it doesn't. Static typing protects you from errors > that you just never make (it doesn't even do much for that dolt down > the hall that you wish would have a horrible keyboarding accident and > never code again), and it very much gets in the way--it's one of the > reasons collection classes are so much of a pain in statically typed > languages. I make these errors from time to time in C++. Consider: template void print_vector(vector const & v) { for(int j = 0; j < v.length(); ++j) { std::cout << v[j] << std::endl; } } Here I'm comparing an int (j) to a size_t (v.length()). The compiler will warn be about comparing a signed to an unsigned (since if the vector is large enough, this could be a serious mistake). I won't have this problem in Ruby -- but only because Ruby has no notion of an unsigned integer, not because Ruby is dynamically typed. Paul