Python from Wise Guy's Viewpoint

Pascal Costanza costanza at web.de
Wed Oct 22 11:37:26 EDT 2003


Marshall Spight wrote:
> "Scott McIntire" <mcintire_charlestown at comcast.net> wrote in message news:MoEkb.821534$YN5.832338 at sccrnsc01...
> 
>>It seems to me that the Agency would have fared better if they just used
>>Lisp - which has bignums - and relied more on regression suites and less on
>>the belief that static type checking systems would save the day.
> 
> 
> I find that an odd conclusion. Given that the cost of bugs is so high
> (especially in the cited case) I don't see a good reason for discarding
> *anything* that leads to better correctness. Yes, bignums is a good
> idea: overflow bugs in this day and age are as bad as C-style buffer
> overruns. Why work with a language that allows them when there
> are languages that don't?
> 
> But why should more regression testing mean less static type checking?
> Both are useful. Both catch bugs. Why ditch one for the other?

...because static type systems work by reducing the expressive power of 
a language. It can't be any different for a strict static type system. 
You can't solve the halting problem in a general-purpose language.

This means that eventually you might need to work around language 
restrictions, and this introduces new potential sources for bugs.

(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. ;)

I think soft typing is a good compromise, because it is a mere add-on to 
an otherwise dynamically typed language, and it allows programmers to 
override the decisions of the static type system when they know better.


Pascal

-- 
Pascal Costanza               University of Bonn
mailto:costanza at web.de        Institute of Computer Science III
http://www.pascalcostanza.de  Römerstr. 164, D-53117 Bonn (Germany)





More information about the Python-list mailing list