Python from Wise Guy's Viewpoint

Erann Gat myfirstname.mylastname at jpl.nasa.gov
Thu Oct 23 11:57:35 EDT 2003


In article <3638acfd.0310230039.306b14f at posting.google.com>,
rafe at cs.mu.oz.au (Ralph Becket) wrote:

> Let me put it like this.  Say I have a statically, expressively, strongly 
> typed language L.  And I have another language L' that is identical to
> L except it lacks the type system.  Now, any program in L that has the
> type declarations removed is also a program in L'.  The difference is
> that a program P rejected by the compiler for L can be converted to a
> program P' in L' which *may even appear to run fine for most cases*.  
> However, and this is the really important point, P' is *still* a 
> *broken* program.  Simply ignoring the type problems does not make 
> them go away: P' still contains all the bugs that program P did.

No.  The fallacy in this reasoning is that you assume that "type error"
and "bug" are the same thing.  They are not.  Some bugs are not type
errors, and some type errors are not bugs.  In the latter circumstance
simply ignoring them can be exactly the right thing to do.

(On the other hand, many, perhaps most, type errors are bugs, and so
having a type system provide warnings can be a very useful thing IMO.)

E.




More information about the Python-list mailing list