[Types-sig] RFC 0.1

Martijn Faassen m.faassen@vet.uu.nl
Tue, 14 Dec 1999 20:19:34 +0100


Guido van Rossum wrote:
> 
> [Martijn Faassen]
> > I agree with this, which is I am advocating a strong split (for
> > simplicity) of fully-statically checked code and normal python code.
> 
> You can already do this -- write in Java or C.

Good answer, but I'd prefer to write more Pythonic code. If I want to
translate my Python module to C, I have to work hard. If I want to
translate my Python module to a static Python module, I 'just' need to
add type annotations and change some parts that are 'too dynamic'. Most
Python code is fairly static.

And I didn't intend to *stop* at this, I just think it's valuable
'early' payoff.

> > Later on you can work on blurring the interface between the two. First
> > *fully* type annotated functions (classes, modules, what you want),
> > which can only refer to other things that are fully annotated. By 'fully
> > annotated' I mean all names have a type. I keep disagreeing with Paul's
> > simplification of initially throwing out constructed types such as list
> > of integer, as that would break my own approach at simplicity. :)
> 
> Agreed.  List of integer and its friends are important.  Also
> correspondences (see my example of a sum() function taking a list of
> <something> and an additional single <something>.
> 
> > If we throw out the syntax issue and use Python constructs for types
> > until we know more, we'll all be happier, right? :) The syntax will be
> > clear when the semantics is. Guido is good at syntax, let him figure out
> > a good syntax for it, let's just focus on the semantics.
> 
> Thank you.  This of course leaves Paul with the question of how to
> prototype all this -- he'll have to make *something* up. :-)

You're welcome. As to the prototype, you can easily make up something in
Python. I have posted an example of this to the list in another post.

Regards,

Martijn