From: Dan Sugalski Date: 2002-12-19T05:15:32+09:00 Subject: Re: help -- persuade my boss to adopt ruby At 2:58 PM +0900 12/18/02, Bulat Ziganshin wrote: >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 It doesn't get you any of the benefits you wanted it for, though. There's no speed win without a lot of work and there's no safety win. What, then, is the point? >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 That doesn't buy you any easy win. To get even a hard win you have to: *) Forbid runtime method redefinitions and changes *) Add in variable typing and type enforcement *) Add in method call signatures *) Dedicate a year or so of very good programmer effort For the really hard win, you need to throw in another few years of excellent programmer effort, in which case all the restrictions you placed for the merely hard win aren't needed. -- Dan --------------------------------------"it's like this"------------------- Dan Sugalski even samurai dan@sidhe.org have teddy bears and even teddy bears get drunk