Torben Ægidius Mogensen wrote: > "Rob Thorpe" <[EMAIL PROTECTED]> writes: > > > Torben Ægidius Mogensen wrote: > > > > That's the point: Bugs that in dynamically typed languages would > > > require testing to find are found by the compiler in a statically > > > typed language. So whil eit may take onger to get a program thatgets > > > past the compiler, it takes less time to get a program that works. > > > > In my experience the opposite is true for many programs. > > Having to actually know the precise type of every variable while > > writing the program is not necessary, it's a detail often not relevant > > to the core problem. The language should be able to take care of > > itself. > > > > In complex routines it can be useful for the programmer to give types > > and for the compiler to issue errors when they are contradicted. But > > for most routines it's just an unnecessary chore that the compiler > > forces on the programmer. > > Indeed. So use a language with type inference.
Well, for most purposes that's the same as dynamic typing since the compiler doesn't require you to label the type of your variables. I occasionally use CMUCL and SBCL which do type inference, which is useful at improving generated code quality. It also can warn the programmer if they if they reuse a variable in a context implying that it's a different type which is useful. I see type inference as an optimization of dynamic typing rather than a generalization of static typing. But I suppose you can see it that way around. -- http://mail.python.org/mailman/listinfo/python-list