[Types-sig] Re: Static typing & IDEs

Stephan R.A. Deibel sdeibel@wingide.com
Sat, 13 Apr 2002 19:46:49 -0400 (EDT)


On Sat, 13 Apr 2002 Richard Davies wrote:
> I realise that this groups is pretty dormant at the moment, but I
> wondered if the following was another argument for adding static
> typing separate from those already mentioned. A number of modern
> IDEs/editors provide context sensitive help (eg. MS IntelliSense)
> while you are typing - i.e. suggesting fields/methods that are
> appropriate to the object/class you are working with at the time. This
> behaviour is dependant on the editor being able to parse the (possibly
> incomplete) code and derive type information. Adding static typing to
> python will enable smart editors to take advantage of this.

When we first starting writing Wing IDE in 1999 I was a proponent of
adding optional typing to Python for this reason.

We found, however, that the information you need for features like
auto-completion, call tips, context help, etc, can be derived from Python
as it is.  We're pretty sure this extends to things like refactoring tools
as well, although we haven't written these yet.

In extracting data types for values, you're not dealing with definate
knowledge of the data type, but probable type as infered from instance
creations, through assignments, function invocations, etc.  I.e., you
sort of assume usage is correct, which indeed it is 99.9% of the time
(at least in my experience with using Python).

Sometimes a value can have multiple possible types, but this is quite rare
in practice so reasonable autocompletion, call tips, etc can still be
presented.

I won't deny that static typing would make writing the IDE a *lot* easier,
and would make the inference process much less compute intensive.  But
it's not a requirement for these types of features, as far as we have seen
up to now.

BTW, after 3 years working intensively with Python, I now believe lack of
data typing is one of Python's big strengths, as far as boosting
productivity and simplifying the development and maintenance processes.

- Stephan

------------------------------------------------------------------------
Wing IDE for Python                          Archaeopteryx Software, Inc
www.wingide.com                              Take Flight!