From: Bulat Ziganshin Date: 2002-12-18T14:58:31+09:00 Subject: Re: help -- persuade my boss to adopt ruby Hello Dan, Tuesday, December 17, 2002, 6:55:06 PM, you wrote: DS> I don't, though--you cut out some interesting bits in the middle. And DS> you also completely missed the point of this: >>DS> Dynamic typing also has a number of advantages that make it better >>DS> suited for several classes of problems than a statically typed >>DS> language such as C or Java. The cost that dynamic typing imposes is >>DS> the price you pay for that better suitability--it's an engineering >>DS> tradeoff like any other, as no feature is free. dynamic typing can coexist with static typing in one program DS> If you want the dynamicity of Ruby, the speed is something you live DS> with, and if you want much of a speedup (beyond, say, a factor of DS> three or four) it's a lot of work. If you *don't* want the dynamicity DS> of Ruby, why bother arguing? Without that dynamicity, Ruby's not that DS> much different than any of a dozen other languages. >>i think that 90% of declarations may be statically typed and this give more >>robust and self-commenting code. DS> In my experience it doesn't. Static typing protects you from errors DS> that you just never make trivial example: char c=1000; printf("%d",c); DS> (it doesn't even do much for that dolt down DS> the hall that you wish would have a horrible keyboarding accident and DS> never code again), and it very much gets in the way--it's one of the DS> reasons collection classes are so much of a pain in statically typed DS> languages. eiffel, for example? DS> Partial typing is of no use for speedups. The only way to get an easy DS> speedup is to go fully-typed and forbid runtime method redefinition. you find bottleneck in your code and rewrite this with static typing. as result, this function will run faster. "forbid runtime method redefinition" can be made on a class-by-class basis. see "freeze Int" in my example DS> Partial typing is *also* of no use for compile-time catching the DS> errors you're looking to catch. (ignoring the fact that those errors DS> just aren't made) i make such errors :) -- Best regards, Bulat mailto:bulatz@integ.ru