Optional Static Typing

Robert Kern rkern at ucsd.edu
Sun Dec 26 05:00:41 CET 2004

Luis M. Gonzalez wrote:
> I don't understand why this discussion on optional static typing came
> up right at this moment.
> As far as I know, it has been discussed many times in the past, and
> there even was a SIG that simply died... but it seems that it never was
> something of much interest to python developers (that's my impression,
> I might be wrong).
> Now, that the Pypy project is steadily advancing (and which is aimed at
> making Python faster while keeping it dynamic and simple), why has this
> topyc been raised?
> Also there's starkiller, which deals with agressive type inference and
> compilation to native code. If these projects are serious and are well
> headed, then I don't know why we are talking now of static typing.
> Lets say that Pypy and/or Starkiller end up as succesful projects, what
> would be the advantage of having static typing in Python?

Starkiller would *love* type declarations. In Michael Salib's words (to 
my recollection), "every piece of type information helps." I'm sure that 
PyPy's code generator(s) could use this information to good effect, too.

Automatic type inferencing is great, but sometimes the inference is 
"object". Being able to supply more information about types helps 
Starkiller keep the inferences tight and specific.

Robert Kern
rkern at ucsd.edu

"In the fields of hell where the grass grows high
  Are the graves of dreams allowed to die."
   -- Richard Harter

More information about the Python-list mailing list