Next step after pychecker

Jacek Generowicz jacek.generowicz at cern.ch
Tue Feb 1 05:59:31 EST 2005


Paul Rubin <http://phr.cx@NOSPAM.invalid> writes:

> Philippe Fremy <phil at freehackers.org> writes:
> > I would like to develop a tool that goes one step further than
> > pychecker to ensure python program validity. The idea would be to get
> > close to what people get on ocaml: a static verification of all types
> > of the program, without any kind of variable declaration. This would
> > definitely brings a lot of power to python.
> 
> You know, I've always thought that ML-style type inference is an
> impressive technical feat, but why is it so important to not use
> declarations?  This is an aspect I've never really understood.

You gain something akin to duck typing, though in a formalized way
(type classes). The code works for any types which provide the
features which are used in the code, without regard for the specific
type. You gain generic programming.

You also gain not having to clutter your code with all the type
declarations. And you gain not having to decide what types you will
use too early on in development.



More information about the Python-list mailing list