Python from Wise Guy's Viewpoint

Pascal Costanza costanza at web.de
Wed Oct 22 20:39:57 EDT 2003


Matthias Blume wrote:

> Pascal Costanza <costanza at web.de> writes:
> 
> 
>>...because static type systems work by reducing the expressive power
>>of a language.
> 
> 
> It depends a whole lot on what you consider "expressive".  In my book,
> static type systems (at least some of them) work by increasing the
> expressive power of the language because they let me express certain
> intended invariants in a way that a compiler can check (and enforce!)
> statically, thereby expediting the discovery of problems by shortening
> the edit-compile-run-debug cycle.

The set of programs that are useful but cannot be checked by a static 
type system is by definition bigger than the set of useful programs that 
can be statically checked. So dynamically typed languages allow me to 
express more useful programs than statically typed languages.

>>(Now you could argue that current sophisticated type systems cover 90%
>>of all cases and that this is good enough, but then I would ask you
>>for empirical studies that back this claim. ;)
> 
> In my own experience they seem to cover at least 99%.

I don't question that. If this works well for you, keep it up. ;)

> (And where are _your_ empirical studies which show that "working around
> language restrictions increases the potential for bugs"?)

I don't need a study for that statement because it's a simple argument: 
if the language doesn't allow me to express something in a direct way, 
but requires me to write considerably more code then I have considerably 
more opportunities for making mistakes.


Pascal





More information about the Python-list mailing list