Python from Wise Guy's Viewpoint

Pascal Costanza costanza at web.de
Thu Oct 23 11:22:09 EDT 2003


Adrian Hey wrote:
> Pascal Costanza wrote:
> 
> 
>>Fergus Henderson wrote:

> I've been using statically typed FPL's for a 
> good few years now, and I can only think of one occasion where I had
> "good" code rejected by the type checker (and even then the work around
> was trivial). All other occasions it was telling me my programs were
> broken (and where they were broken), without me having to test it.
> 
> This is good thing.  

Maybe you haven't written the kind of programs yet that a static type 
system can't handle.

> As for dynamics, I don't think anybody would deny the usefulness of a
> dynamic type system as a *supplement to* the static type system.

I don't deny that static type systems can be a useful supplement to a 
dynamic type system in certain contexts.

> But no way is a dynamic type system an
> adequate *substitute for* modern static type systems. Most code
> can be (and should be IMO) checked for type errors at compile time.

There is an important class of programs - those that can reason about 
themselves and can change themselves at runtime - that cannot be 
statically checked.

Your claim implies that such code should not be written, at least not 
"most of the time" (whatever that means). Why? Maybe I am missing an 
important insight about such programs that you have.


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