RFC: Viper: yet another python implementation

Graham Matthews graham at sloth.math.uga.edu
Sun Aug 15 17:09:39 EDT 1999


John (Max) Skaller (skaller at maxtal.com.au) wrote:
: 	Preliminary tests indicate reasonable results
: determining types. In critical cases such as inner loops,
: it is usually possible:
: 
: 	s = ""
: 	for  i in range(1,10): s = s + str(i)
: 
: Obviously i is an integer here, and s a string.

Is it? Surely that depends on what "range" and "+" are bound to at
runtime.

I don't wish to be a spoil-sport but I really do believe that type
inference in Python is a waste of time, and hence your ideas to speed
things up are doomed to fail in all but the simplest of cases. Python
is far too dynamic to be type inferenced (or even type checked). Whether
that's a good thing or not is another matter, but it's certainly a
fact I think.

graham

-- 

      England's not the mythical land of madame george and roses
        It's the home of police who kill black boys on mopeds




More information about the Python-list mailing list