[Types-sig] Type inferencing

Guido van Rossum guido@CNRI.Reston.VA.US
Tue, 14 Dec 1999 15:35:50 -0500

> I think that we may be talking at cross purposes. I am trying to define
> a formal, independently implementable specification for a type system
> that Python users will understand and like. Some languages use global
> type inferencing as a formally specified part of the type checker but my
> impression is that users do not like the resulting languages.

OK, you may be right.  Although I think that with Python as a starting
point we'd end up with something sufficiently different from ML that
the jury is still out on whether users will like it or not.

> Jim created an implementation of an excellent, intelligent optimizing
> compiler. His work is as, or more, interesting than mine, but it is a
> different problem he is trying to solve. (OPT) comes into the picture
> because my work makes his much, much easier and more effective in many
> cases. I am totally in favor of particular global type inferencing
> implementations, but am not in favor of requiring global type inference
> of every static type checker implementation nor of requiring
> safety-conscious Python users to think in terms of global type
> inferencing.

OK, I see and agree.

I think that I would like to make *some* form of type inference (maybe
only within the function body) part of the formal specs.  Note that in
a limited way, inference is already part of Python (and sometimes
deplored -- because the diagnostics stink): if you write "a = 1"
anywhere in a function body, then a is a local variable everywhere in
that function (unless there's a "global a" as well).

Now, please make some progress with a design...

--Guido van Rossum (home page: http://www.python.org/~guido/)