Some Python (Monty) Perspective (was Re: Language change and code breaks)
Grant Edwards
grante at visi.com
Fri Jul 27 12:40:47 EDT 2001
In article <ni92mt4a7e2k64b1vn6rm0jaqlkf525mjp at 4ax.com>, Stephen Horne wrote:
>>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 sure it _would_ be a much more painful change. That was my
point. An argument could be made that mixing ints and floats
is A Bad Thing(tm). But, even if we bought that argument it
would be such a disruptive change that it wouldn't be worth
implimenting.
>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).
I attempt to never use implicit casting -- in C I make sure
lint complains when I do. I'm sure I'm sloppier in Python.
[Actually, it's been a couple years since I used a float in a C
program...]
--
Grant Edwards grante Yow! I'm having
at a tax-deductible
visi.com experience! I need an
energy crunch!!
More information about the Python-list
mailing list