[Types-sig] Proposed Goals PEP

Tim Hochberg tim.hochberg@ieee.org
Tue, 13 Mar 2001 10:50:28 -0700

----- Original Message -----
From: "Marcin 'Qrczak' Kowalczyk" <qrczak@knm.org.pl

[Tim Hochberg (aka me)]
>> Parameterized types are easy to support in this model, although
>> the checks are potentially very expensive.


>When a list is typechecked for the first time, items are checked
>and the type is remembered. From this time the invariant is that it
>contains only items of the right type. Further typechecking won't
>iterate over elements but look at the stored type. Typechecking of
>future items will happen at the time of their insertion.

While this might be nice, I think this type of thing is an optimization the
whose discussion can be deferred till later.

>> Consider a parameterized list type:

>I would certainly like to use real type objects and class objects in
>type expressions. Unfortunately it creates a syntactic ambiguity when
>user-defined parametrized types are involved:
>   ClassName(Type1, Type2)
>This looks like a constructor call. We don't want this kind of

It looks like a constructor call because it is a constructor call.

[Lots of stuff about semi-static type-checking snipped].

We've been down that road before (twice I believe), and each time the
proposals have spiraled out of control and then collapsed under their own
weight (to mix some metaphors). To convince people to try this path again
will probably take some doing.