Some Python (Monty) Perspective (was Re: Language change and code breaks)

Stephen Horne steve at lurking.demon.co.uk
Fri Jul 27 04:55:55 EDT 2001


On Wed, 25 Jul 2001 16:42:14 GMT, grante at visi.com (Grant Edwards)
wrote:

>In article <9jmqp3$9n1 at dispatch.concentric.net>, Tim Randolph wrote:
>
>>It is obvious that he only has the good of the language at heart.  
>
>If that's true, who worries about the good of the language's users?
>
>Perhaps making int/int => float makes the language better.  [I don't
>personally think so, but it's a matter of taste.]  However, it does hurt at
>least some of the existing group of users.  How many and how bad is up for
>debate.
>
>I think that not allowing ints and floats to be mixed would make it a better
>lanauge, but that would probably hurt even more users.

I'm not sure about this. It would mean replacing a lot of implicit
casts with exceptions. Code would break for sure, but it would break
by refusing to work at all - not by causing trusted apps to give bad
results.

I'm not suggesting we should do it (though I did make a sarcastic
suggestion elsewhere) - I'm just not convinced it would be a more
painful change.

On the whole I don't mind implicit casts - fully strong typing can
obscure logic too much with too many explicit casts (and as casts
don't normally specify which type they are converting from, each cast
weakens the supposedly strong typing anyway).




More information about the Python-list mailing list